messages
listlengths 3
3
|
|---|
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# follows ( f1 , f2 )\n# tweets ( id , uid , text , createdate )\n# user_profiles ( uid , name , email , partitionid , followers )\n# follows.f2 = user_profiles.uid\n# follows.f1 = user_profiles.uid\n# tweets.uid = user_profiles.uid\n\n#\n### Find the maximum and total number of followers of all users.\nSELECT \n"
},
{
"role": "assistant",
"content": "max ( followers ) , sum ( followers ) from user_profiles"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Find the names of all the catalog entries.\nSELECT \n"
},
{
"role": "assistant",
"content": "distinct ( catalog_entry_name ) from catalog_contents"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### What are all the catalog entry names?\nSELECT \n"
},
{
"role": "assistant",
"content": "distinct ( catalog_entry_name ) from catalog_contents"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Find the list of attribute data types possessed by more than 3 attribute definitions.\nSELECT \n"
},
{
"role": "assistant",
"content": "attribute_data_type from attribute_definitions group by attribute_data_type having count ( * ) > 3"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### What are the attribute data types with more than 3 attribute definitions?\nSELECT \n"
},
{
"role": "assistant",
"content": "attribute_data_type from attribute_definitions group by attribute_data_type having count ( * ) > 3"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### What is the attribute data type of the attribute with name \"Green\"?\nSELECT \n"
},
{
"role": "assistant",
"content": "attribute_data_type from attribute_definitions where attribute_name = 'Green'"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Find the attribute data type for the attribute named \"Green\".\nSELECT \n"
},
{
"role": "assistant",
"content": "attribute_data_type from attribute_definitions where attribute_name = 'Green'"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Find the name and level of catalog structure with level between 5 and 10.\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_level_name , catalog_level_number from catalog_structure where catalog_level_number between 5 and 10"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### What are the name and level of catalog structure with level number between 5 and 10\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_level_name , catalog_level_number from catalog_structure where catalog_level_number between 5 and 10"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Find all the catalog publishers whose name contains \"Murray\"\nSELECT \n"
},
{
"role": "assistant",
"content": "distinct ( catalog_publisher ) from catalogs where catalog_publisher like '%Murray%'"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Which catalog publishers have substring \"Murray\" in their names?\nSELECT \n"
},
{
"role": "assistant",
"content": "distinct ( catalog_publisher ) from catalogs where catalog_publisher like '%Murray%'"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Which catalog publisher has published the most catalogs?\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_publisher from catalogs group by catalog_publisher order by count ( * ) desc limit 1"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Find the catalog publisher that has the most catalogs.\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_publisher from catalogs group by catalog_publisher order by count ( * ) desc limit 1"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Find the names and publication dates of all catalogs that have catalog level number greater than 5.\nSELECT \n"
},
{
"role": "assistant",
"content": "catalogs.catalog_name , catalogs.date_of_publication from catalogs join catalog_structure on catalogs.catalog_id = catalog_structure.catalog_id where catalog_level_number > 5"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### What are the name and publication date of the catalogs with catalog level number above 5?\nSELECT \n"
},
{
"role": "assistant",
"content": "catalogs.catalog_name , catalogs.date_of_publication from catalogs join catalog_structure on catalogs.catalog_id = catalog_structure.catalog_id where catalog_level_number > 5"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### What are the entry names of catalog with the attribute possessed by most entries.\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_contents.catalog_entry_name from catalog_contents join catalog_contents_additional_attributes on catalog_contents.catalog_entry_id = catalog_contents_additional_attributes.catalog_entry_id where catalog_contents_additional_attributes.attribute_value = ( select attribute_value from catalog_contents_additional_attributes group by attribute_value order by count ( * ) desc limit 1 )"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Find the entry names of the catalog with the attribute that have the most entries.\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_contents.catalog_entry_name from catalog_contents join catalog_contents_additional_attributes on catalog_contents.catalog_entry_id = catalog_contents_additional_attributes.catalog_entry_id where catalog_contents_additional_attributes.attribute_value = ( select attribute_value from catalog_contents_additional_attributes group by attribute_value order by count ( * ) desc limit 1 )"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### What is the entry name of the most expensive catalog (in USD)?\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_entry_name from catalog_contents order by price_in_dollars desc limit 1"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Find the entry name of the catalog with the highest price (in USD).\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_entry_name from catalog_contents order by price_in_dollars desc limit 1"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### What is the level name of the cheapest catalog (in USD)?\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_structure.catalog_level_name from catalog_contents join catalog_structure on catalog_contents.catalog_level_number = catalog_structure.catalog_level_number order by catalog_contents.price_in_dollars asc limit 1"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Find the level name of the catalog with the lowest price (in USD).\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_structure.catalog_level_name from catalog_contents join catalog_structure on catalog_contents.catalog_level_number = catalog_structure.catalog_level_number order by catalog_contents.price_in_dollars asc limit 1"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### What are the average and minimum price (in Euro) of all products?\nSELECT \n"
},
{
"role": "assistant",
"content": "avg ( price_in_euros ) , min ( price_in_euros ) from catalog_contents"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Give me the average and minimum price (in Euro) of the products.\nSELECT \n"
},
{
"role": "assistant",
"content": "avg ( price_in_euros ) , min ( price_in_euros ) from catalog_contents"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### What is the product with the highest height? Give me the catalog entry name.\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_entry_name from catalog_contents order by height desc limit 1"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Which catalog content has the highest height? Give me the catalog entry name.\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_entry_name from catalog_contents order by height desc limit 1"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Find the name of the product that has the smallest capacity.\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_entry_name from catalog_contents order by capacity asc limit 1"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Which catalog content has the smallest capacity? Return the catalog entry name.\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_entry_name from catalog_contents order by capacity asc limit 1"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Find the names of all the products whose stock number starts with \"2\".\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_entry_name from catalog_contents where product_stock_number like '2%'"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Which catalog contents have a product stock number that starts from \"2\"? Show the catalog entry names.\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_entry_name from catalog_contents where product_stock_number like '2%'"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Find the names of catalog entries with level number 8.\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_contents.catalog_entry_name from catalog_contents join catalog_contents_additional_attributes on catalog_contents.catalog_entry_id = catalog_contents_additional_attributes.catalog_entry_id where catalog_contents_additional_attributes.catalog_level_number = '8'"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### What are the names of catalog entries with level number 8?\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_contents.catalog_entry_name from catalog_contents join catalog_contents_additional_attributes on catalog_contents.catalog_entry_id = catalog_contents_additional_attributes.catalog_entry_id where catalog_contents_additional_attributes.catalog_level_number = '8'"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Find the names of the products with length smaller than 3 or height greater than 5.\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_entry_name from catalog_contents where length < 3 or width > 5"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Which catalog contents have length below 3 or above 5? Find the catalog entry names.\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_entry_name from catalog_contents where length < 3 or width > 5"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Find the name and attribute ID of the attribute definitions with attribute value 0.\nSELECT \n"
},
{
"role": "assistant",
"content": "attribute_definitions.attribute_name , attribute_definitions.attribute_id from attribute_definitions join catalog_contents_additional_attributes on attribute_definitions.attribute_id = catalog_contents_additional_attributes.attribute_id where catalog_contents_additional_attributes.attribute_value = 0"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Which attribute definitions have attribute value 0? Give me the attribute name and attribute ID.\nSELECT \n"
},
{
"role": "assistant",
"content": "attribute_definitions.attribute_name , attribute_definitions.attribute_id from attribute_definitions join catalog_contents_additional_attributes on attribute_definitions.attribute_id = catalog_contents_additional_attributes.attribute_id where catalog_contents_additional_attributes.attribute_value = 0"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Find the name and capacity of products with price greater than 700 (in USD).\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_entry_name , capacity from catalog_contents where price_in_dollars > 700"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Which catalog contents has price above 700 dollars? Show their catalog entry names and capacities.\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_entry_name , capacity from catalog_contents where price_in_dollars > 700"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Find the dates on which more than one revisions were made.\nSELECT \n"
},
{
"role": "assistant",
"content": "date_of_latest_revision from catalogs group by date_of_latest_revision having count ( * ) > 1"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### On which days more than one revisions were made on catalogs.\nSELECT \n"
},
{
"role": "assistant",
"content": "date_of_latest_revision from catalogs group by date_of_latest_revision having count ( * ) > 1"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### How many products are there in the records?\nSELECT \n"
},
{
"role": "assistant",
"content": "count ( * ) from catalog_contents"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Find the total number of catalog contents.\nSELECT \n"
},
{
"role": "assistant",
"content": "count ( * ) from catalog_contents"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### Name all the products with next entry ID greater than 8.\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_entry_name from catalog_contents where next_entry_id > 8"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# attribute_definitions ( attribute_id , attribute_name , attribute_data_type )\n# catalogs ( catalog_id , catalog_name , catalog_publisher , date_of_publication , date_of_latest_revision )\n# catalog_structure ( catalog_level_number , catalog_id , catalog_level_name )\n# catalog_contents ( 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 )\n# catalog_contents_additional_attributes ( catalog_entry_id , catalog_level_number , attribute_id , attribute_value )\n# catalog_structure.catalog_id = catalogs.catalog_id\n# catalog_contents.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_level_number = catalog_structure.catalog_level_number\n# catalog_contents_additional_attributes.catalog_entry_id = catalog_contents.catalog_entry_id\n\n#\n### What are the catalog entry names of the products with next entry ID above 8?\nSELECT \n"
},
{
"role": "assistant",
"content": "catalog_entry_name from catalog_contents where next_entry_id > 8"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### How many aircrafts do we have?\nSELECT \n"
},
{
"role": "assistant",
"content": "count ( * ) from aircraft"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### How many aircrafts exist in the database?\nSELECT \n"
},
{
"role": "assistant",
"content": "count ( * ) from aircraft"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### Show name and distance for all aircrafts.\nSELECT \n"
},
{
"role": "assistant",
"content": "name , distance from aircraft"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What are the names and distances for all airplanes?\nSELECT \n"
},
{
"role": "assistant",
"content": "name , distance from aircraft"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### Show ids for all aircrafts with more than 1000 distance.\nSELECT \n"
},
{
"role": "assistant",
"content": "aid from aircraft where distance > 1000"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What are the ids of all aircrafts that can cover a distance of more than 1000?\nSELECT \n"
},
{
"role": "assistant",
"content": "aid from aircraft where distance > 1000"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### How many aircrafts have distance between 1000 and 5000?\nSELECT \n"
},
{
"role": "assistant",
"content": "count ( * ) from aircraft where distance between 1000 and 5000"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What is the count of aircrafts that have a distance between 1000 and 5000?\nSELECT \n"
},
{
"role": "assistant",
"content": "count ( * ) from aircraft where distance between 1000 and 5000"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What is the name and distance for aircraft with id 12?\nSELECT \n"
},
{
"role": "assistant",
"content": "name , distance from aircraft where aid = 12"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What is the name and distance for the aircraft that has an id of 12?\nSELECT \n"
},
{
"role": "assistant",
"content": "name , distance from aircraft where aid = 12"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What is the minimum, average, and maximum distance of all aircrafts.\nSELECT \n"
},
{
"role": "assistant",
"content": "min ( distance ) , avg ( distance ) , max ( distance ) from aircraft"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### Return the minimum, average and maximum distances traveled across all aircrafts.\nSELECT \n"
},
{
"role": "assistant",
"content": "min ( distance ) , avg ( distance ) , max ( distance ) from aircraft"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### Show the id and name of the aircraft with the maximum distance.\nSELECT \n"
},
{
"role": "assistant",
"content": "aid , name from aircraft order by distance desc limit 1"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What is the id and name of the aircraft that can cover the maximum distance?\nSELECT \n"
},
{
"role": "assistant",
"content": "aid , name from aircraft order by distance desc limit 1"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### Show the name of aircrafts with top three lowest distances.\nSELECT \n"
},
{
"role": "assistant",
"content": "name from aircraft order by distance asc limit 3"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What are the aircrafts with top 3 shortest lengthes? List their names.\nSELECT \n"
},
{
"role": "assistant",
"content": "name from aircraft order by distance asc limit 3"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### Show names for all aircrafts with distances more than the average.\nSELECT \n"
},
{
"role": "assistant",
"content": "name from aircraft where distance > ( select avg ( distance ) from aircraft )"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What are the names of all aircrafts that can cover more distances than average?\nSELECT \n"
},
{
"role": "assistant",
"content": "name from aircraft where distance > ( select avg ( distance ) from aircraft )"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### How many employees do we have?\nSELECT \n"
},
{
"role": "assistant",
"content": "count ( * ) from employee"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What is the number of employees?\nSELECT \n"
},
{
"role": "assistant",
"content": "count ( * ) from employee"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### Show name and salary for all employees sorted by salary.\nSELECT \n"
},
{
"role": "assistant",
"content": "name , salary from employee order by salary asc"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What is the name and salary of all employees in order of salary?\nSELECT \n"
},
{
"role": "assistant",
"content": "name , salary from employee order by salary asc"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### Show ids for all employees with at least 100000 salary.\nSELECT \n"
},
{
"role": "assistant",
"content": "eid from employee where salary > 100000"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What is the id of every employee who has at least a salary of 100000?\nSELECT \n"
},
{
"role": "assistant",
"content": "eid from employee where salary > 100000"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### How many employees have salary between 100000 and 200000?\nSELECT \n"
},
{
"role": "assistant",
"content": "count ( * ) from employee where salary between 100000 and 200000"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What is the number of employees that have a salary between 100000 and 200000?\nSELECT \n"
},
{
"role": "assistant",
"content": "count ( * ) from employee where salary between 100000 and 200000"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What is the name and salary for employee with id 242518965?\nSELECT \n"
},
{
"role": "assistant",
"content": "name , salary from employee where eid = 242518965"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What is the name and salary of the employee with the id 242518965?\nSELECT \n"
},
{
"role": "assistant",
"content": "name , salary from employee where eid = 242518965"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What is average and maximum salary of all employees.\nSELECT \n"
},
{
"role": "assistant",
"content": "avg ( salary ) , max ( salary ) from employee"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What is the average and largest salary of all employees?\nSELECT \n"
},
{
"role": "assistant",
"content": "avg ( salary ) , max ( salary ) from employee"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### Show the id and name of the employee with maximum salary.\nSELECT \n"
},
{
"role": "assistant",
"content": "eid , name from employee order by salary desc limit 1"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What is the id and name of the employee with the highest salary?\nSELECT \n"
},
{
"role": "assistant",
"content": "eid , name from employee order by salary desc limit 1"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### Show the name of employees with three lowest salaries.\nSELECT \n"
},
{
"role": "assistant",
"content": "name from employee order by salary asc limit 3"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What is the name of the 3 employees who get paid the least?\nSELECT \n"
},
{
"role": "assistant",
"content": "name from employee order by salary asc limit 3"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### Show names for all employees with salary more than the average.\nSELECT \n"
},
{
"role": "assistant",
"content": "name from employee where salary > ( select avg ( salary ) from employee )"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What are the names of all employees who have a salary higher than average?\nSELECT \n"
},
{
"role": "assistant",
"content": "name from employee where salary > ( select avg ( salary ) from employee )"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### Show the id and salary of Mark Young.\nSELECT \n"
},
{
"role": "assistant",
"content": "eid , salary from employee where name = 'Mark Young'"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What is the id and salary of the employee named Mark Young?\nSELECT \n"
},
{
"role": "assistant",
"content": "eid , salary from employee where name = 'Mark Young'"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### How many flights do we have?\nSELECT \n"
},
{
"role": "assistant",
"content": "count ( * ) from flight"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What is the number of flights?\nSELECT \n"
},
{
"role": "assistant",
"content": "count ( * ) from flight"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### Show flight number, origin, destination of all flights in the alphabetical order of the departure cities.\nSELECT \n"
},
{
"role": "assistant",
"content": "flno , origin , destination from flight order by origin asc"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What is the flight number, origin, and destination for all flights in alphabetical order by departure cities?\nSELECT \n"
},
{
"role": "assistant",
"content": "flno , origin , destination from flight order by origin asc"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### Show all flight number from Los Angeles.\nSELECT \n"
},
{
"role": "assistant",
"content": "flno from flight where origin = 'Los Angeles'"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What are the numbers of all flights coming from Los Angeles?\nSELECT \n"
},
{
"role": "assistant",
"content": "flno from flight where origin = 'Los Angeles'"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### Show origins of all flights with destination Honolulu.\nSELECT \n"
},
{
"role": "assistant",
"content": "origin from flight where destination = 'Honolulu'"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What are the origins of all flights that are headed to Honolulu?\nSELECT \n"
},
{
"role": "assistant",
"content": "origin from flight where destination = 'Honolulu'"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### Show me the departure date and arrival date for all flights from Los Angeles to Honolulu.\nSELECT \n"
},
{
"role": "assistant",
"content": "departure_date , arrival_date from flight where origin = 'Los Angeles' and destination = 'Honolulu'"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What are the departure and arrival dates of all flights from LA to Honolulu?\nSELECT \n"
},
{
"role": "assistant",
"content": "departure_date , arrival_date from flight where origin = 'Los Angeles' and destination = 'Honolulu'"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### Show flight number for all flights with more than 2000 distance.\nSELECT \n"
},
{
"role": "assistant",
"content": "flno from flight where distance > 2000"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What are the numbers of all flights that can cover a distance of more than 2000?\nSELECT \n"
},
{
"role": "assistant",
"content": "flno from flight where distance > 2000"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What is the average price for flights from Los Angeles to Honolulu.\nSELECT \n"
},
{
"role": "assistant",
"content": "avg ( price ) from flight where origin = 'Los Angeles' and destination = 'Honolulu'"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What is the average price for flights from LA to Honolulu?\nSELECT \n"
},
{
"role": "assistant",
"content": "avg ( price ) from flight where origin = 'Los Angeles' and destination = 'Honolulu'"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### Show origin and destination for flights with price higher than 300.\nSELECT \n"
},
{
"role": "assistant",
"content": "origin , destination from flight where price > 300"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What is the origin and destination for all flights whose price is higher than 300?\nSELECT \n"
},
{
"role": "assistant",
"content": "origin , destination from flight where price > 300"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### Show the flight number and distance of the flight with maximum price.\nSELECT \n"
},
{
"role": "assistant",
"content": "flno , distance from flight order by price desc limit 1"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### What is the flight number and its distance for the one with the maximum price?\nSELECT \n"
},
{
"role": "assistant",
"content": "flno , distance from flight order by price desc limit 1"
}
] |
[
{
"role": "system",
"content": "You are an excellent SQL writer."
},
{
"role": "user",
"content": "### Complete sqlite SQL query only and with no explanation, and do not select extra columns that are not explicitly requested in the query.\n### Sqlite SQL tables, with their properties:\n#\n# flight ( flno , origin , destination , distance , departure_date , arrival_date , price , aid )\n# aircraft ( aid , name , distance )\n# employee ( eid , name , salary )\n# certificate ( eid , aid )\n# flight.aid = aircraft.aid\n# certificate.aid = aircraft.aid\n# certificate.eid = employee.eid\n\n#\n### Show the flight number of flights with three lowest distances.\nSELECT \n"
},
{
"role": "assistant",
"content": "flno from flight order by distance asc limit 3"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.