text
stringlengths
769
1.23k
[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_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 ; 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 ; English query: Which files are located one level below the directory 'part1'?[/INST] SQL query: select t3.asset_short_name 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 where t1.asset_short_name = 'part1'
[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_nosql: 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 ; relation_assoc: 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 me the description for every nosql database in the lake.[/INST] SQL query: select asset_short_name, description from asset_nosql
[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 ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show all columns that have 10 or more rows, 10 or more columns and were created in the last 10 days.[/INST] SQL query: select asset_short_name, num_rows, num_cols, creation_date from asset_column where num_rows >= 10 and num_cols >= 10 and creation_date >= datetime('now', '-10 days')
[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_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 ; relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: For each type_id, how many assets are present in the lake?[/INST] SQL query: select asset_type_id, count(*) from asset group by asset_type_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_has_table_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 ; 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: For each table id, show the number of tables derived from it.[/INST] SQL query: select source_asset_id, count(*) from relation_derive_table_table group by source_asset_id
[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 ; 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_assoc_class_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: Find all columns associated with the classification 'enterprise'.[/INST] SQL query: select t3.asset_id, t3.asset_short_name from asset_classification as t1 join relation_assoc_class_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 = 'enterprise'
[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_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 ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; asset_classification: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: How many folders does the lake contain?[/INST] SQL query: select count(*) from asset_directory
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_has_table_col: 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_classification: 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_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: List all the business terms and classifications in the lake.[/INST] SQL query: select asset_long_name from asset_label
[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_joinable_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_business_term: 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 owner accounts does the lake contain?[/INST] SQL query: select count(*) from asset_owner
[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_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; 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 ; relation_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show a sample of 5 records of classifications.[/INST] SQL query: select * from asset_classification limit 5
[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_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; 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: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: Find all assets with the term 'nyc' in it's name or description.[/INST] SQL query: select asset_short_name, description from asset where asset_short_name like '%nyc%' or description like '%nyc%'
[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_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: 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 all directory names with size greater than 1MB.[/INST] SQL query: select asset_short_name from asset_directory where dsize > 1000
[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 ; relation_has_table_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 ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show me the number of assets of each type owned by each owner account.[/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_has_table_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_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 ; asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: Sort all files in the lake by extension and creation date.[/INST] SQL query: select asset_short_name, extension, creation_date from asset_file order by extension asc creation_date asc
[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_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 ; relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: How many columns are associated with each classification label that has 'nyc' 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 'nyc%'
[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 ; relation_has_dir_dir: 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 ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; English query: How many columns are associated with each business term that contains the word 'id' in it's name?[/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: 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 ; 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 ; 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 database records for the lake.[/INST] SQL query: select * from asset_database
[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_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; 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_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Which are the directories in the data lake that were created in the past 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: relation_has_table_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 ; relation_joinable_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 ; English query: Print the name, description, number of rows and number of columns for all tables.[/INST] SQL query: select asset_short_name, description, num_rows, num_cols from asset_table
[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_classification: asset_id asset_type_id asset_short_name asset_long_name description synonyms 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_business_term: 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 ; English query: For each table, count the number of columns associated with the classification 'customer'.[/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 join relation_assoc_class_col as t3 on t2.target_asset_id = t3.target_asset_id join asset_classification as t4 on t3.source_asset_id = t4.asset_id group by t1.asset_id, t1.asset_short_name where t4.asset_short_name = 'customer'
[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_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; 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 ; English query: Find the total size of files owned by each asset owner that owns 5 files or more. [/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) as c1, 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 having c1 >= 5
[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_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_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Find all folders in the lake with size greater than 1GB.[/INST] SQL query: select asset_short_name from asset_directory where dsize > 1000000
[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_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; relation_assoc: 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_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: What is the total size of all files owned by an asset owner for all asset owners who own more than 5 files.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) as c1, 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 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 ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; 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_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show the type and length of all columns in the data lake.[/INST] SQL query: select asset_short_name, col_type, col_length from asset_column
[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_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_business_term: 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: Show the creation date for all relational databases.[/INST] SQL query: select asset_short_name, creation_date from asset_rdbms
[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_classification: 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_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 ; English query: List all the different types of columns present in the lake.[/INST] SQL query: select distinct col_type from asset_column
[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_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_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 ; English query: Which tables have more than 100 rows in them?[/INST] SQL query: select asset_short_name from asset_table where num_rows > 100
[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 ; 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 ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms 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 assets are owned by each user account created in the past week?[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) from asset_owner as t1 join relation_own 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: asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; 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_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 ; English query: Which are the tables contain a column that includes the word 'borough' in it's name?[/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 like '%borough%'
[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_business_term: 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 ; 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 ; English query: For each business term, count the number of columns it has been assigned to in the past 1 year.[/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', '-365 days')
[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_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; relation_joinable_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 ; 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 joinable table pairs.[/INST] SQL query: select t1.asset_short_name, t3.asset_short_name from asset_table as t1 join relation_joinable_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
[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 ; relation_has_table_col: 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_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; English query: Print the type and description for all columns in the table named 'work_order_management_module'.[/INST] SQL query: select t3.col_type, t3.description 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 = 'work_order_management_module'
[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_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 ; relation_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: List all files whose parent directory is 'part1'[/INST] SQL query: select t3.asset_short_name 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 where t1.asset_short_name = 'part1'
[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_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_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; asset_classification: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: Show all tables created after June 24 2023.[/INST] SQL query: select asset_short_name from asset_table where creation_date >= '2023-06-24'
[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_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: Display the id, names and creation dates for all business terms.[/INST] SQL query: select asset_id, 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_nosql: 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 ; asset_business_term: 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 ; English query: When was the last time that each directory was modified?[/INST] SQL query: select asset_short_name, modified_date from asset_directory
[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_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; relation_has_dir_file: 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_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; English query: Count the number of tables derived from each table in the past year.[/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', '-365 days')
[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_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; 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_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show all the metadata for table from file relations.[/INST] SQL query: select * from relation_has_file_table
[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_nosql: 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 ; 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 ; English query: What are the 25 oldest folders in the data lake?[/INST] SQL query: select asset_short_name, creation_date from asset_directory order by creation_date asc limit 25
[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_owner: 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 ; 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 ; English query: Show all metadata records for asset owners.[/INST] SQL query: select * 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 ; 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 ; 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 number of assets owned by each owner account created in the past year.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) from asset_owner as t1 join relation_own 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', '-365 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 ; relation_assoc_term_col: 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 ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; English query: Count the number of columns that each business term is associated with.[/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
[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_joinable_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 ; English query: How many association relationships are recorded in the data lake?[/INST] SQL query: select count(*) from relation_assoc
[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_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 ; relation_has_table_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: Display all the records for 10 oldest assets in the lake by modified date.[/INST] SQL query: select * from asset order by modified_date asc limit 10
[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_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_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 ; English query: How many assets of each type id does each user account own?[/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: asset_classification: 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 ; asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; 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 ; English query: Order all assets in the lake by type id and creation date.[/INST] SQL query: select asset_short_name, asset_type_id, creation_date from asset order by type_id asc, 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 ; 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 ; 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: How many columns does the taxi zones table have?[/INST] SQL query: select num_cols from asset_table where asset_short_name = 'taxi_zones'
[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_business_term: 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_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Order files by extension and from oldest to newest.[/INST] SQL query: select asset_short_name, extension, creation_date from asset_file order by extension asc 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 ; 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 ; 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: How many tables have a column name 'zip'?[/INST] SQL query: select count(*) from asset_column where asset_short_name = 'zip'
[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_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 ; 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 ; English query: List all asset nodes in the lake.[/INST] SQL query: select asset_short_name from asset
[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_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_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 ; English query: Count the number of integer columns in the lake.[/INST] SQL query: select count(*) from asset_column where col_type = 'int'
[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: 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 ; relation_derive_table_table: 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 descriptions for the 10 newest assets in the lake.[/INST] SQL query: select asset_short_name, description, creation_date from asset order by creation_date desc limit 10
[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 ; relation_derive_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_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; 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 all columns of type boolean.[/INST] SQL query: select asset_short_name from asset_column where col_type = 'bool'
[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_business_term: 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 ; 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 ; English query: Show the number of business terms owned by 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_business_term 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_owner: 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_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 ; 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: Order all nosql databases in the lake by their creation date.[/INST] SQL query: select asset_short_name, creation_date from asset_nosql order by creation_date asc
[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 ; 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 ; relation_derive_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 ; English query: Sort the nosql databases in the lake by their last modified date.[/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: relation_has_table_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 ; 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_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; English query: Display the description and number of tables for all relational databases.[/INST] SQL query: select asset_short_name, description, num_tables from asset_rdbms
[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_business_term: 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 ; 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_table_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Print the type and description for all columns in the table named 'weights_measurements_and_other_tests'.[/INST] SQL query: select t3.col_type, t3.description 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 = 'weights_measurements_and_other_tests'
[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_owner: 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_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; relation_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Count the number of folder 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_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_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 ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Count the number of columns of each type present in tables in that contain the word 'water' in their names.[/INST] SQL query: select t3.col_type, count(*) 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 group by t3.col_type where t1.asset_short_name like '%water%'
[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: 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_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 ; English query: Find all columns whose name or description contains the term 'id'.[/INST] SQL query: select asset_short_name, description from asset_column where asset_short_name like '%id%' or description like '%id%'
[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_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 ; 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: How many business terms 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_business_term 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_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_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 ; 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 owned by 'jdoe' that were created in the past one year.[/INST] SQL query: select t3.asset_short_name, t3.creation_date from asset_owner as t1 join relation_own 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.asset_short_name = 'jdoe' and t1.creation_date >= datetime('now', '-365 days')
[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_unionable_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 ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Display the number of columns and descripton for all tables in the lake.[/INST] SQL query: select asset_short_name, num_cols, description from asset_table
[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_own: 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 ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: List the owner id for every table.[/INST] SQL query: select t1.asset_short_name, t2.source_asset_id from asset_table as t1 join relation_own as t2 on t1.asset_id = t2.target_asset_id
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_has_table_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_classification: 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: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: Show the names of all the derived tables in the lake.[/INST] SQL query: select distinct t1.asset_short_name from asset as t1 join relation_derive_table_table as t2 on t1.asset_id = t2.target_asset_id
[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_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_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 all metadata for any 10 tables in the lake.[/INST] SQL query: select * from asset_table limit 10
[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_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; relation_joinable_table_table: 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: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Display all metadata records for asset owners.[/INST] SQL query: select * from asset_owner
[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_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_own: 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: Find all tables derived from files with prefix 'dot_vzv'.[/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.asset_short_name like 'dot_vzv%'
[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_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_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 ; English query: Which are the tables that have a column named 'zip'?[/INST] SQL query: select count(*) from asset_column where asset_short_name = 'zip'
[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: 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 ; relation_has_file_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 ; English query: Show all metadata for relations in the lake.[/INST] SQL query: select * from relation
[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_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; relation_derive_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 ; English query: Order all relational databases by number of tables.[/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_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; 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 ; asset_business_term: 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: What are the 3 biggest directories in the lake?[/INST] SQL query: select asset_short_name from asset_directory order_by dsize limit 3
[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_business_term: 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_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: Which columns have the word 'water' in their name or description?[/INST] SQL query: select * from asset_column where asset_short_name like '%water%' or description like '%water%'
[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_assoc_class_col: 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 ; relation_own: 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 number of unionable relationships found for each table in the past 24 hours.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) 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, t1.asset_short_name where t2.creation_date >= datetime('now', '-24 hours')
[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: 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 ; 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 ; English query: Order all csv files by their creation date from the oldest to the newest.[/INST] SQL query: select asset_short_name, creation_date from asset_file where extension = 'csv' order by creation_date asc
[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_nosql: 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 ; relation_unionable_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: Count the number of assets owned by each owner account that contains the term 'nyc' in it's name or description.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) from asset_owner as t1 join relation_own as t2 on t1.asset_id = t2.source_asset_id group by t1.asset_id, t1.asset_short_name where t1.asset_short_name like '%nyc%' or t1.description like '%nyc%'
[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_dir_file: 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_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: For each file, show me the file name, description and owner id.[/INST] SQL query: select t1.asset_short_name, t1.description, t2.source_asset_id from asset_file as t1 join relation_own as t2 on t1.asset_id = t2.target_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 ; 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 ; 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 columns with the term 'covid' in their name or description.[/INST] SQL query: select * from asset_column where asset_short_name like '%covid%' or description like '%covid%'
[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 ; 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 ; asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms 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: Find all tables in the lake that have 5 columns or more.[/INST] SQL query: select asset_short_name, num_cols from asset_table where num_cols >= 5
[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 ; asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; relation_has_table_col: 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_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; English query: Count the number of columns in all tables that contain the term 'nyc' in it's name.[/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.asset_short_name like '%nyc%'
[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_rdbms: 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_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: How many unique database names are there in the lake?[/INST] SQL query: select count(distinct asset_short_name) from asset_database
[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_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 ; asset_owner: 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 ; English query: For each table, show the number of tables that have been derived from it in the past one week.[/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', '-7 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_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_has: 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: Show records for a sample of 5 folders in the lake.[/INST] SQL query: select * from asset_directory 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_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 ; relation_has_file_table: 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: Show the creation date and last modified date for the 10 biggest tables in the lake by the number of rows.[/INST] SQL query: select asset_short_name, creation_date, modified_date, num_rows from asset_table order by num_rows desc
[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_owner: 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 ; relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Which tables have more than 100 rows in them?[/INST] SQL query: select asset_short_name from asset_table where num_rows > 100
[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_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; 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 ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; English query: Show the name and description for all business terms.[/INST] SQL query: select asset_long_name, description from asset_business_term
[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_joinable_table_table: 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 ; 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: Among all the columns in the lake, count the occurences of each column type.[/INST] SQL query: select col_type, count(*) from asset_column group by col_type
[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_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; 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 ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: For each folder, count the number of files immediately inside it.[/INST] SQL query: select t3.asset_short_name, count(*) from asset_directory as t1 join relation_has as t2 on t1.asset_id = t2.source_asset_id join asset_file as t3 on t2.target_asset_id = t3.asset_id
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_has_table_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 ; relation_unionable_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 ; 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 description, number of rows and number of columns for every single table.[/INST] SQL query: select asset_short_name, description, num_rows, num_cols from asset_table
[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_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_owner: 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 ; English query: For each owner, find the average size of files containing a description.[/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 where t3.description <> ''
[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: 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_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 ; English query: Show the first 10 classification labels created.[/INST] SQL query: select asset_short_name, creation_date from asset_classification order by creation_date asc limit 10
[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_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_assoc_class_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: Show all the metadata for file in directory relations.[/INST] SQL query: select * from relation_has_dir_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 ; asset_business_term: 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 ; relation_assoc_term_col: 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 ; English query: Sort databases by their last modified date.[/INST] SQL query: select asset_short_name, modified_date from asset_database order by modified_date desc
[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_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_unionable_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 ; English query: Show all tables that contain less than 10 columns.[/INST] SQL query: select asset_short_name, num_cols from asset_table where num_cols < 10
[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 ; relation_own: 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 ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; English query: Show the average size of a file owned by each user for all users who own more than 10 files.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) as c1, 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 having c1 > 10
[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_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 ; 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_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show all relational databases that contain more than 10 tables.[/INST] SQL query: select asset_short_name from asset_rdbms where num_tables > 10
[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: 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_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 ; English query: How many databases are present in the lake?[/INST] SQL query: select count(*) from asset_database
[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 ; 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 ; asset_classification: 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: Show the creation dates and descriptions for all classification assets.[/INST] SQL query: select asset_short_name, creation_date, description from asset_classification
[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_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_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Give me the id and name for columns which have business terms associated with them.[/INST] SQL query: select distinct t1.asset_id, t1.asset_short_name from asset_column as t1 join relation_assoc_term_col as t2 on t1.asset_id = t2.target_asset_id