text
stringlengths
769
1.23k
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; asset_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: Who are the top 10 people who own the most assets?[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) as c1 from asset as t1 join relation_own as t2 on t1.asset_id = t2.source_asset_id group by t2.source_asset_id order by c1 desc
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_classification: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: What are the top 10 classifications which are associated with the most columns?[/INST] SQL query: select t1.asset_short_name, count(*) as c1 from asset_classification as t1 join relation_assoc_class_col as t2 on t1.asset_id = t2.source_asset_id group by t2.source_asset_id desc limit 10
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: How many assets does each owner account own?[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) from asset as t1 join relation_own as t2 on t1.asset_id = t2.source_asset_id group by t1.asset_id
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; asset_classification: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; English query: How many assets of each type are there in the lake?[/INST] SQL query: select t1.type_short_name, count(*) from asset_type as t1 join asset as t2 on t1.type_id on t2.asset_type_id group by t2.asset_type_id
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; asset_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_classification: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show all metadata for 'has' relations.[/INST] SQL query: select * from relation_has
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; English query: Print the creation dates of all owner accounts.[/INST] SQL query: select asset_short_name, creation_date from asset_owner
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; English query: What is the total size of all files created in the last 30 days for each user account?[/INST] SQL query: select t1.asset_id, t1.asset_short_name, sum(t3.fsize) from asset_owner as t1 join relation_own as t2 on t1.asset_id = t2.source_asset_id join asset_file as t3 on t2.target_asset_id = t3.asset_id group by t1.asset_id, t1.asset_short_name where t3.creation_date >= datetime('now', '-30 days')
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; English query: Show all metadata records for labels.[/INST] SQL query: select * from asset_label
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; English query: List all assets owned by the user with user id '7'.[/INST] SQL query: select t1.asset_short_name from asset as t1 join relation_own as t2 on t1.asset_id = t2.target_asset_id where t2.source_asset_id = 7
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; relation: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show the size of each file in the lake sorted in descending order.[/INST] SQL query: select asset_short_name, fsize from asset_file order by fsize desc
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; English query: How many total relations are represented in the data lake?[/INST] SQL query: select count(*) from relation
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; English query: What are the 5 oldest tables in the data lake?[/INST] SQL query: select asset_short_name, creation_date from asset_table order by creation_date asc limit 5
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_has_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Among assets created in the past one day, show the number of assets owned by each user account id.[/INST] SQL query: select source_asset_id, count(*) from relation_own where creation_date >= datetime('now', '-24 hours') group by source_asset_id
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: List the top 10 user accounts with the most assets.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) as c1 from asset as t1 join relation_own as t2 on t1.asset_id = t2.source_asset_id group by t2.source_asset_id order by c1 desc
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show the last modified date for all columns in the lake.[/INST] SQL query: select asset_short_name, modified_date from asset_column
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_table_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: Show the number of columns for all tables with 10 columns or more.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) as c1 from asset_table as t1 join relation_has_table_col as t2 on t1.asset_id = t2.source_asset_id group by t1.asset_id, t1.asset_short_name having c1 >= 10
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_has_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; English query: Give the average folder size for each asset owner.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, avg(t3.dsize) from asset_owner as t1 join relation_own as t2 on t1.asset_id = t2.source_asset_id join asset_directory as t3 on t2.target_asset_id = t3.asset_id group by t1.asset_id, t1.asset_short_name
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; relation: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Name the 5 earliest created folders in the data lake.[/INST] SQL query: select asset_short_name, creation_date from asset_directory order by creation_date asc limit 5
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show all records for all assets in the lake.[/INST] SQL query: select * from asset
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Count the number of assets owned by each owner id.[/INST] SQL query: select source_asset_id, count(*) from relation_own group by source_asset_id
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; relation_has_table_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Order all column in the lake from newest to oldest.[/INST] SQL query: select asset_short_name, creation_date from asset_column order by creation_date desc
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; English query: Sort all labels chronologically by creation date.[/INST] SQL query: select asset_short_name, creation_date from asset_label order by creation_date asc
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; relation_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_table_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: How many rows and columns does the popular baby names table have?[/INST] SQL query: select num_rows, num_cols from asset_table where asset_short_name = 'popular_baby_names'
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; English query: Order all assets in descending order of their last modified timestamp.[/INST] SQL query: select asset_short_name, modified_date from asset order by modified_date desc
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_has_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Order all business terms by creation date[/INST] SQL query: select asset_short_name, creation_date from asset_business_term order by creation_date asc
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; asset_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Print all metadata for joinable table relationships.[/INST] SQL query: select * from relation_joinable_table_table
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; asset_classification: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show the names of all tables that are unionable with other tables.[/INST] SQL query: select distinct t1.asset_short_name from asset_table as t1 join relation_unionable_table_table as t2 on t1.asset_id = t2.target_asset_id
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_classification: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_has_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: How many files does the lake contain?[/INST] SQL query: select count(*) from asset_file
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_has_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; English query: List all tables that are unionable with the table 'swim_for_life'.[/INST] SQL query: select t1.asset_short_name from asset_table as t1 join relation_unionable_table_table as t2 on t1.asset_id = t2.target_asset_id join asset_table as t3 on t2.source_asset_id = t3.asset_id where t3.asset_short_name = 'swim_for_life'
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_classification: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: Display the name, long name and creation date for all tables in the lake.[/INST] SQL query: select asset_short_name, asset_long_name, creation_date from asset_table
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; English query: Show short name and long name for the table from file 'youth_engagement.csv'[/INST] SQL query: select t3.asset_short_name, t3.asset_long_name from asset_file as t1 join relation_has_file_table as t2 on t1.asset_id = t2.source_asset_id join asset_table on t2.target_asset_id = t3.asset_id where t1.short_name = 'youth_engagement.csv'
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; English query: Sort all databases in the lake from oldest to newest.[/INST] SQL query: select asset_short_name, creation_date from asset_database order by creation_date asc
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: For each table, show the number of tables derived from it.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) from asset_table as t1 join relation_derive_table_table as t2 on t1.asset_id = t2.source_asset_id group by t1.asset_id
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; English query: Order all nosql databases in the lake by their last modified timestamp.[/INST] SQL query: select asset_short_name, modified_date from asset_nosql order by modified_date desc
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; English query: Show the number of files and directories contained by each directory that has more than 25 sub items.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) as c1 from asset_directory as t1 join relation_has as t2 on t1.asset_id = t2.source_asset_id group by t1.asset_id, t1.asset_short_name having c1 > 25
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_classification: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: How many classifications are owned by each user?[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) as c1 from asset_owner as t1 join relation_own as t2 on t1.asset_id = t2.source_asset_id join asset_classification as t3 on t2.target_asset_id = t3.asset_id group by t1.asset_id, t1.asset_short_name
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; English query: Show the short name, long name and last modified timestamp for all tables.[/INST] SQL query: select asset_short_name, asset_long_name, modified_date from asset_table
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: What is the average file size for each asset owner?[/INST] SQL query: select t1.asset_id, t1.asset_short_name, avg(t3.fsize) from asset_owner as t1 join relation_own as t2 on t1.asset_id = t2.source_asset_id join asset_file as t3 on t2.target_asset_id = t3.asset_id group by t1.asset_id, t1.asset_short_name
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; asset_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; relation_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Which are the tables in the lake that are joinable with other tables.[/INST] SQL query: select distinct t1.asset_short_name from asset_table as t1 join relation_joinable_table_table as t2 on t1.asset_id = t2.target_asset_id
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_classification: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; relation_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; English query: How many rows and columns does each table have?[/INST] SQL query: select asset_short_name, num_rows, num_cols from asset_table
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show the average size of a file directly inside each folder in the lake.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, avg(t3.dsize) from asset_directory as t1 join relation_has_dir_file as t2 on t1.asset_id = t2.source_asset_id join asset_file as t3 on t2.target_asset_id = t3.asset_id group by t1.asset_id, t1.asset_short_name
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: For each column id, show the number of classifications associated with it.[/INST] SQL query: select target_asset_id, count(*) from relation_assoc_class_col group by target_asset_id
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show the description and number of tables for all rdbms in the lake.[/INST] SQL query: select asset_short_name, description, num_tables from asset_rdbms
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; relation: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; English query: List records of 10 tables in the lake without ids.[/INST] SQL query: select asset_short_name, asset_long_name, description, synonyms, creation_date, modified_date, num_rows, num_cols from asset_table limit 10
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Count the number of boolean columns in the lake.[/INST] SQL query: select count(*) from asset_column where col_type = 'bool'
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show all columns of type string.[/INST] SQL query: select asset_short_name from asset_column where col_type = 'string'
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; English query: Show all the folders in the lake sorted by size.[/INST] SQL query: select asset_short_name, dsize from asset_directory order by dsize desc
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; asset_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: When was each business term created?[/INST] SQL query: select asset_short_name, creation_date from asset_business_term
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; relation_has_table_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Count the number of string columns in the lake.[/INST] SQL query: select count(*) from asset_column where col_type = 'string'
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_has_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; asset_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; English query: Show the extension and size of all files in the lake.[/INST] SQL query: select asset_short_name, extension, fsize from asset_file
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: List all the files owned by 'asmith'.[/INST] SQL query: select t1.asset_short_name from asset_file as t1 join relation_own as t2 on t1.asset_id = t2.target_asset_id join asset_owner as t3 on t2.source_asset_id = t3.asset_id where t3.asset_short_name = ‘asmith’
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show the number of files belonging to each owner account.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) as c1 from asset_owner as t1 join relation_own as t2 on t1.asset_id = t2.source_asset_id join asset_file as t3 on t2.target_asset_id = t3.asset_id group by t1.asset_id, t1.asset_short_name
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; relation_has_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: List all folders which have a subfolder size greater than 5kb[/INST] SQL query: select t1.asset_id, t1.asset_short_name, avg(t3.dsize) as a1 from asset_directory as t1 join relation_has_dir_dir as t2 on t1.asset_id = t2.source_asset_id join asset_directory as t3 on t2.target_asset_id = t3.asset_id group by t1.asset_id, t1.asset_short_name having a1 > 5
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; relation_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; relation_has_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Which tables have 'traffic' in their names?[/INST] SQL query: select count(*) from asset_table where asset_short_name like '%traffic%'
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; English query: Which asset owner account ids own more than 5 assets?[/INST] SQL query: select source_asset_id, count(*) as c1 from relation_own group by source_asset_id having c1 > 5
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; relation: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_table_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Count the number of columns for all tables created in the last one week.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) from asset_table as t1 join relation_has_table_col as t2 on t1.asset_id = t2.source_asset_id group by t1.asset_id, t1.asset_short_name where t1.creation_date >= datetime('now', '-7 days')
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; English query: Select the directory name and last modified date for all directories.[/INST] SQL query: select asset_short_name, modified_date from asset_directory
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; English query: For each owner account, display the mean size of a file added in past month.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, sum(t3.fsize) from asset_owner as t1 join relation_own as t2 on t1.asset_id = t2.source_asset_id join asset_file as t3 on t2.target_asset_id = t3.asset_id group by t1.asset_id, t1.asset_short_name where t3.creation_date >= datetime('now', '-30 days')
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; relation_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Count the number unionable tables for each table in the lake.[/INST] SQL query: select t1.asset_id, t1.asset_short_name from asset_table as t1 join relation_unionable_table_table as t2 on t1.asset_id = t2.source_asset_id group by t1.asset_id
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; relation_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_table_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: How many tables were derived from each table in the lake in the past 24 hours?[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) from asset_table as t1 join relation_derive_table_table as t2 on t1.asset_id = t2.source_asset_id group by t1.asset_id, t1.asset_short_name where t2.creation_date >= datetime('now', '-24 hours')
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: How many relational databases are present in the lake?[/INST] SQL query: select count(*) from asset_rdbms
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; relation_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: What are the different column types?[/INST] SQL query: select distinct col_type from asset_column
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: Select creation date and description for all account owners.[/INST] SQL query: select asset_short_name, creation_date, description from asset_owner
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; relation_has_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: Show all meta data records for all business term column association relationships.[/INST] SQL query: select * from relation_assoc_term_col
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: For each owner account, calculate the average size of a file added in the past month.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, sum(t3.fsize) from asset_owner as t1 join relation_own as t2 on t1.asset_id = t2.source_asset_id join asset_file as t3 on t2.target_asset_id = t3.asset_id group by t1.asset_id, t1.asset_short_name where t3.creation_date >= datetime('now', '-30 days')
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: What is the average size of a folder created in the last 10 days for each asset owner.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, avg(t3.dsize) from asset_owner as t1 join relation_own as t2 on t1.asset_id = t2.source_asset_id join asset_directory as t3 on t2.target_asset_id = t3.asset_id group by t1.asset_id, t1.asset_short_name where t3.creation_date >= datetime('now', '-10 days')
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Order all columns in the lake by their last modified timestamp.[/INST] SQL query: select asset_short_name, modified_date from asset_column order by modified_date desc
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_classification: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; English query: How many columns are associated with each classification that contains 'water' as a prefix?[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) from asset_classification as t1 join relation_assoc_class_col as t2 on t1.asset_id = t2.source_asset_id group by t1.asset_id, t1.asset_short_name having t1.asset_short_name like 'water%'
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: List the short name, long name and description for all tables.[/INST] SQL query: select asset_short_name, asset_long_name, description from asset_table
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; English query: Select id and names of columns are associated with classifications.[/INST] SQL query: select distinct t1.asset_id, t1.asset_short_name from asset_column as t1 join relation_assoc_class_col as t2 on t1.asset_id = t2.target_asset_id
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; English query: Show the type and creation date for all databases in the lake.[/INST] SQL query: select asset_short_name, database_type, creation_date from asset_database
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; relation_has_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; English query: Display all the metadata for each column in the lake.[/INST] SQL query: select * from column
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Sort all relational databases by the number of tables they contain.[/INST] SQL query: select asset_short_name, num_tables from asset_rdbms order by num_tables desc
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; asset_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: Select the type id, short name, long name and description for all labels.[/INST] SQL query: select asset_type_id, asset_short_name, asset_long_name, description from asset_label
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: Show the column counts for all business terms that have 'id' in their names.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) from asset_business_term as t1 join relation_assoc_term_col as t2 on t1.asset_id = t2.source_asset_id group by t1.asset_id, t1.asset_short_name having t1.asset_short_name like '%id%'
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show the creation date and description for all business terms in the data lake.[/INST] SQL query: select asset_short_name, creation_date, description from asset_business_term
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: How many nodes are there in the schema graph for the lake?[/INST] SQL query: select count(*) from asset
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: How many columns has each business term been assigned to in the past 20 days?[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) from asset_business_term as t1 join relation_assoc_term_col as t2 on t1.asset_id = t2.source_asset_id group by t1.asset_id, t1.asset_short_name where t2.creation_date >= datetime('now', '-20 days')
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; relation_has_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show the creation date and description for all labels and order the records by creation date.[/INST] SQL query: select asset_short_name, creation_date, description from asset_label order by creation_date asc
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; relation_has_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; English query: Show the top 10 directories that contain the most subdirectories.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) as c1 from asset_directory as t1 join relation_has_dir_dir as t2 on t1.asset_id = t2.source_asset_id group by t2.source_asset_id order by c1 desc
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; asset_classification: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; relation_has_table_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Find all tables with a column named 'zip_code'[/INST] SQL query: select t1.asset_short_name from asset_table as t1 join relation_has_table_col as t2 on t1.asset_id = t2.source_asset_id join asset_column as t3 on t2.target_asset_id = t3.asset_id where t3.asset_short_name = 'zip_code'
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; relation: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show all directories created in the last 24 hours.[/INST] SQL query: select asset_short_name, creation_date from asset_directory where creation_date >= datetime('now', '-24 hours')
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_table_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: List the number of tables derived from each table in the lake.[/INST] SQL query: select t1.asset_short_name, count(*) from asset_table as t1 join relation_derive_table_table as t2 on t1.asset_id = t2.source_asset_id
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; English query: How many tables have the word 'student' in it's name?[/INST] SQL query: select count(*) from asset_table where asset_short_name like '%student%'
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; relation: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; English query: Find all tables in the lake derived from xlsx files.[/INST] SQL query: select t3.asset_short_name from asset_file as t1 join relation_has_file_table as t2 on t1.asset_id = t2.source_asset_id join asset_table as t3 on t2.target_asset_id = t3.asset_id where t1.extension = 'xlsx'
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_table_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; English query: Show the type and length for all columns in the lake within tables that have the word 'vehicle' in their names.[/INST] SQL query: select t3.asset_short_name, t3.col_type, t3.col_length from asset_table as t1 join relation_has_table_col as t2 on t1.asset_id = t2.source_asset_id join asset_column as t3 on t2.target_asset_id = t3.asset_id where t1.asset_short_name like '%vehicle%'
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: What are the different types of files in the lake?[/INST] SQL query: select distinct extension from asset_file
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; English query: Print the number of rows, number of columns and the description for all tables in the lake.[/INST] SQL query: select asset_short_name, num_rows, num_cols, description from asset_table
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; relation_has_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show the size and descriptions for all files in the lake.[/INST] SQL query: select asset_short_name, fsize, description from asset_file
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; relation_has_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; English query: Show all tables created in the last 24 hours.[/INST] SQL query: select asset_short_name from asset_table where creation_date >= datetime('now', '-24 hours')
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: Show all descriptions for asset owners.[/INST] SQL query: select asset_short_name, description from asset_owner
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; English query: List the top 10 people who own the most relational databases.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) as c1 from asset_owner as t1 join relation_own as t2 on t1.asset_id = t2.source_asset_id join asset_rdbms as t3 on t2.target_asset_id = t3.asset_id group by t1.asset_id, t1.asset_short_name order by c1 limit 10
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_has_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: List the extension, creation date and last modified date for all files in the lake.[/INST] SQL query: select asset_short_name, creation_date, modified date from asset_file
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; English query: For each asset type, count the number of assets owned by each asset owner.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, t3.asset_type_id, count(*) from asset_owner as t1 join relation_own as t2 on t1.asset_id = t2.source_asset_id join asset as t3 on t2.target_asset_id = t3.asset_id group by t1.asset_id, t1.asset_short_name, t3.asset_type_id
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_classification: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: Show the number of columns that each business term has been assigned to in the past 10 days.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) from asset_business_term as t1 join relation_assoc_term_col as t2 on t1.asset_id = t2.source_asset_id group by t1.asset_id, t1.asset_short_name where t2.creation_date >= datetime('now', '-10 days')
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_table_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; English query: Order all labels by creation date.[/INST] SQL query: select asset_short_name, creation_date from asset_label order by creation_date asc
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; asset_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: Show the number of rows in each table.[/INST] SQL query: select asset_short_name, num_rows from asset_table
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Print all integer columns in the data lake.[/INST] SQL query: select asset_short_name from asset_column where col_type = 'int'
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_classification: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_table_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; English query: Count the number of columns associated with each classification that contains the word 'category' in it's name.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) from asset_classification as t1 join relation_assoc_class_col as t2 on t1.asset_id = t2.source_asset_id group by t1.asset_id, t1.asset_short_name having t1.asset_short_name like '%category%'
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; asset_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: How many unique file names are there in the lake?[/INST] SQL query: select count(distinct asset_short_name) from asset_file