text
stringlengths
769
1.23k
[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_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 ; relation: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: What are the creation times for all folders in the data lake?[/INST] SQL query: select asset_short_name, creation_date from asset_directory
[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_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc_term_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: List all column ids and the number of associated business terms for all columns associated with at least 1 business term.[/INST] SQL query: select target_asset_id, count(*) as c1 from relation_assoc_term_col group by target_asset_id having c1 > 0
[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: 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_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show the number of columns and description for the 10 biggest tables by number of rows.[/INST] SQL query: select asset_short_name, num_cols, description, num_rows from asset_table order by num_rows desc limit 10
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_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_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 ; English query: Show the number of business terms owned by each asset owner.[/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_assoc_term_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 ; asset_label: 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: Show the name and description for all business terms.[/INST] SQL query: select asset_short_name, description from asset_business_terms
[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 ; 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 ; relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show the names and creation date of the 5 oldest derived tables.[/INST] SQL query: select asset_short_name, creation_date from asset_table as t1 join relation_derive_table_table as t2 on t1.asset_id = t2.target_asset_id order by t2.creation_date asc limit 5
[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_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_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: For each table in the data lake, count the number of columns that contain a description.[/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.description <> ''
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_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 ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: How many labels 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_label 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_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 ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; English query: Which are the databases in the lake owned by 'cslab'?[/INST] SQL query: select t3.asset_short_name from asset_owner as t1 join relation_own as t2 on t1.asset_id = t2.source_asset_id join asset_database as t3 on t2.target_asset_id = t3.asset_id where t1.asset_short_name = 'cslab'
[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_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: List all tables that have more than 25 rows.[/INST] SQL query: select asset_short_name, num_rows from asset_table where num_rows > 25
[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: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_classification: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; 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: How many directories are present in the data lake?[/INST] SQL query: select count(*) from asset_directory
[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_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 ; 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 ; English query: List all the SQL databases in the data lake.[/INST] SQL query: select asset_short_name from asset_rdbms
[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_assoc_class_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 ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; English query: Find all columns that were created in the past one year and contains the term 'id' in it's name.[/INST] SQL query: select asset_short_name, creation_date from asset_column where asset_short_name like '%id%' and creation_date >= datetime('now', '-365 days')
[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 ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_table_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; English query: Show all the metadata for column from table relations.[/INST] SQL query: select * from relation_has_table_col
[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: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_table_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; English query: Which tables contain the word 'work' in their names a column that contains the word 'hours' 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 t1.asset_short_name like '%work%' and t3.asset_short_name like '%hours%'
[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 ; relation_assoc: 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_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; English query: List all people who own one or more databases in the lake.[/INST] SQL query: select distinct t1.asset_short_name from asset_owner as t1 join relation_own as t2 on t1.asset_id = t2.source_asset_id join asset_database as t3 on t2.target_asset_id = t3.asset_id
[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_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_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: What are the columns associated with at least one classification label?[/INST] SQL query: select distinct t1.asset_short_name from asset_column as t1 join relation_assoc_class_col as t2 on t1.asset_id = t2.ttarget_asset_id
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_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 ; asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; English query: List all string columns created in the past 3 days.[/INST] SQL query: select asset_short_name, creation_date from asset_column where col_type = 'string' and creation_date >= datetime('now', '-3 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_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_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: Sort all assets by type id and last modified date.[/INST] SQL query: select asset_short_name, asset_type_id, modified_date from asset order by type_id asc, modified_date desc
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_classification: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: Count the number of business terms belonging to each asset owner.[/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_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_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_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: List the creation date and description for all columns in the lake.[/INST] SQL query: select asset_short_name, creation_date, description from asset_column
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; 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: 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: Select asset type id, short name and description for all asset owners.[/INST] SQL query: select asset_type_id, asset_short_name, description from asset_owner
[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_has_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show all 'covid' related tables in the lake.[/INST] SQL query: select * from asset_table where asset_short_name like '%covid%'
[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_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_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: List the top 10 people who own the most databases.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) as c1 from asset_owner as t1 join relation_own as t2 on t1.asset_id = t2.source_asset_id join asset_database as t3 on t2.target_asset_id = t3.asset_id group by t1.asset_id, t1.asset_short_name order by c1 limit 10
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_table_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Count the number of columns that each business term has been assigned to in the past 10 days.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) from asset_business_term as t1 join relation_assoc_term_col as t2 on t1.asset_id = t2.source_asset_id group by t1.asset_id, t1.asset_short_name where t2.creation_date >= datetime('now', '-10 days')
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; 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: 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: List the name, description and creation date for all assets in the lake ordered by their creation dates.[/INST] SQL query: select asset_short_name, description, creation_date from asset order by creation_date asc
[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_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_derive_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 ; English query: List the id, short name, long name and description for all business terms.[/INST] SQL query: select asset_id, asset_short_name, asset_long_name, description 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_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 ; relation_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show the descriptions for all labels in the database.[/INST] SQL query: select asset_short_name, description from asset_label
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: Show the id, description and size for all folders.[/INST] SQL query: select asset_short_name, asset_id, description, dsize from asset_directory
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show the creation dates for all folder.[/INST] SQL query: select asset_short_name, creation_date from asset_directory
[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_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 ; 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: List all terms associated with columns.[/INST] SQL query: select asset_long_name from asset_business_term
[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_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; relation_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_derive_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: List all classification along with it's description.[/INST] SQL query: select asset_short_name, description from asset_classification
[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_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: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Select id, number of rows, number of columns and description from the metadata for tables in the lake.[/INST] SQL query: select asset_id, num_rows, num_cols, description from asset_table
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_table_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; English query: Count the number of columns of each type in the 'nyss' table.[/INST] SQL query: select col_type, count(*) from asset_column where asset_short_name = 'nyss'
[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: 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_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 ; English query: List names and descriptions of all databases in the lake.[/INST] SQL query: select asset_short_name, description from asset_database
[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 ; 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_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; English query: How many directory in directory relations are there in the lake?[/INST] SQL query: select count(*) from relation_has_dir_dir
[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_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; 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: Give me the id and name for all columns with at least one label.[/INST] SQL query: select distinct t1.asset_id, t1.asset_short_name from asset_column as t1 join relation_assoc as t2 on t1.asset_id = t2.target_asset_id
[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_label: 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_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: How many tables belong 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_table 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_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; relation_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; English query: Show the 20 newest folders by modified date.[/INST] SQL query: select asset_short_name, modified_date from asset_directory order by modified_date desc limit 20
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; 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 ; English query: Show all ids for directories that have more than 10 files directly inside them.[/INST] SQL query: select source_asset_id, count(*) as c1 from relation_has_dir_file group by source_asset_id having c1 > 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 ; relation_has_dir_dir: 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_has_dir_file: 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 number of instances for each relation type id.[/INST] SQL query: select relation_type_id, count(*) from relation group by relation_type_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_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_classification: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: Which are the assets in the lake owned by Jane Doe?[/INST] SQL query: select t3.asset_short_name 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 where t1.asset_long_name = 'Jane Doe'
[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_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_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; English query: Show the number of rows and number of columns for the 10 biggest tables by number of rows.[/INST] SQL query: select asset_short_name, num_rows, num_cols from asset_table order by num_rows 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 ; relation_joinable_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_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; English query: Count the number of nosql databases in the lake.[/INST] SQL query: select count(*) from asset_nosql
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; 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 columns does each table have?[/INST] SQL query: select asset_short_name, num_cols from asset_table
[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 ; asset_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; relation_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Which columns have at least one business term associated with them?[/INST] SQL query: select distinct t1.asset_short_name from asset_column as t1 join relation_assoc_term_col as t2 on t1.asset_id = t2.target_asset_id
[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_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; 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: Which are the tables in the lake owned by 'jdoe'?[/INST] SQL query: select t3.asset_short_name 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'
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_classification: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; English query: Order all csv files by their creation date from the newest to the oldest.[/INST] SQL query: select asset_short_name, creation_date from asset_file where extension = 'csv' order by creation_date desc
[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_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 ; 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: Order all relational database owners by the number of relational databases they own.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) as c1 from asset_owner as t1 join relation_own as t2 on t1.asset_id = t2.source_asset_id join asset_rdbms as t3 on t2.target_asset_id = t3.asset_id group by t1.asset_id, t1.asset_short_name order by c1
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_classification: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; English query: Find all tables with 'workforce' in the name or description[/INST] SQL query: select * from asset_table where asset_short_name like '%workforce%' or description like '%workforce%'
[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_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_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 ; English query: List sizes and descriptions for all files belonging to owner id 3.[/INST] SQL query: select t1.asset_short_name, t1.fsize, t1.description from asset_file as t1 join relation_own as t2 on t1.asset_id = t2.target_asset_id where t2.source_asset_id = 3
[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_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; 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 ; English query: Show the last modified timestamp for all the tables.[/INST] SQL query: select asset_short_name, last_modified from asset_table
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_has_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_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 ; English query: List all assets owned by the user ‘jdoe’.[/INST] SQL query: select t1.asset_short_name from asset as t1 join relation_own as t2 on t1.asset_id = t2.target_asset_id join asset_owner as t3 on t2.source_asset_id = t3.asset_id where t3.asset_short_name = ‘jdoe’
[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: 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_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Print all metadata records for classification labels.[/INST] SQL query: select * from asset_classification
[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_has: 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 ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Count the columns linked with the classification label 'address' in each table.[/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 = 'address'
[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: 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_has_dir_dir: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: How many label association relations are present in the lake.[/INST] SQL query: select count(*) from relation_assoc
[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_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; 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 ; English query: Which are the columns that are 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: 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: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; English query: List the name, description and creation date for all assets in the lake ordered from newest to oldest.[/INST] SQL query: select asset_short_name, description, creation_date from asset order by creation_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 ; relation_assoc: 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_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: Which tables in the data lake have more than 25 columns?[/INST] SQL query: select asset_short_name, num_cols from asset_table where num_cols > 25
[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: 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 ; 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: List all users who own exactly 5 assets[/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 group by t1.asset_id, t1.asset_short_name having c1 = 5
[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_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 ; relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Find the number of columns inside each table that have a classification label that contains the term 'phone' in it.[/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 = 'phone'
[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_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; asset_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; 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 derived from it.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) from asset_table as t1 join relation_derive_table_table as t2 on t1.asset_id = t2.source_asset_id group by t1.asset_id
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: For each directory, list the directory name, owner id and last modified timestamp.[/INST] SQL query: select t1.asset_short_name, t2.source_asset_id, t1.modified_date from asset_directory 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_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_classification: 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 ; English query: Count the number of columns within each table associated with the classification 'zipcode'.[/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 = 'zipcode'
[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_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 ; relation_assoc_term_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show all the nosql databases in the lake ordered from the oldest to the newest.[/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_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_assoc_term_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_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show all records for derived table relationships.[/INST] SQL query: select * from relation_derive_table_table
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation: 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_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 ; English query: Print the number of columns and description for the top 10 tables by number of rows.[/INST] SQL query: select asset_short_name, num_cols, description, num_rows from asset_table order by num_rows desc 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 ; relation: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Which are the relational databases in the lake owned by 'cslab'?[/INST] SQL query: select t3.asset_short_name from asset_owner as t1 join relation_own as t2 on t1.asset_id = t2.source_asset_id join asset_rdbms as t3 on t2.target_asset_id = t3.asset_id where t1.asset_short_name = 'cslab'
[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_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_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 ; English query: Show the column names and descriptions for all columns in the veteran services report table.[/INST] SQL query: select t3.asset_short_name, t3.description from asset_table as t1 join relation_has_table_column 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 = 'veteran_services_report'
[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_table_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_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 ; English query: List all tables owned by 'jdoe' along with it's creation date.[/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'
[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 ; 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 ; relation_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: What is the average size of a file owned by each user who owns 25 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 >= 25
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_classification: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_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_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; English query: List the creation dates for all classification labels.[/INST] SQL query: select asset_short_name, creation_date from asset_classification
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_has: 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_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; English query: What are the sizes of the 10 biggest files in the lake?[/INST] SQL query: select asset_short_name, fsize from asset_file order by fsize desc 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 ; relation_has_file_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_classification: 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: Show the number of assets owned by each user that owns more than 50 assets.[/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 group by t1.asset_id, t1.asset_short_name having c1 > 50
[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_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: What are the folders present in the lake?[/INST] SQL query: select asset_short_name from asset_directory
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_database: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; English query: Display all the metadata for all databases in the lake.[/INST] SQL query: select * from asset_database
[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_joinable_table_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 ; relation_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: How many columns are associated with each label?[/INST] SQL query: select t1.asset_short_name, count(*) from asset_label as t1 join relation_assoc as t2 on t1.asset_id = t2.source_asset_id group by t2.source_asset_id
[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_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; relation_has_table_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; English query: Find all columns with word 'school' in it's name within a table whose name starts with the word 'traffic'.[/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 t1.asset_short_name like 'traffic%' and t3.asset_short_name like '%school%'
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_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 ; asset_classification: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: How many tables does the lake contain?[/INST] SQL query: select count(*) from asset_table
[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: 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_has_table_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: For each folder, count the number of assets 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 as t3 on t2.target_asset_id = t3.asset_id
[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_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; 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 ; English query: How many columns does each asset owner own?[/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_column 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_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_assoc_class_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; English query: Display the column type, column length and description for each column.[/INST] SQL query: select asset_short_name, col_type, col_length, description from asset_column
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_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_classification: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: How many nodes are present in the lake?[/INST] SQL query: select count(*) from asset
[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_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_has: 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: List all the unionable table pairs.[/INST] SQL query: select t1.asset_short_name, t2.asset_short_name from asset_table as t1 join relation_unionable_table_table on t1.asset_id = relation_unionable_table_table.target_asset_id join asset_table as t2 on relation_unionable_table.source_asset_id = t2.asset_id
[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: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_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: Find all records for columns named 'borough'.[/INST] SQL query: select * from asset_column where asset_short_name = 'borough'
[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_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; asset_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 ; English query: For each asset type, how many assets are present in the lake?[/INST] SQL query: select t1.type_short_name, count(*) from asset_type as t1 join asset as t2 on t1.type_id on t2.asset_type_id group by t2.asset_type_id
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset: 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 ; 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_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Show the type ids and counts for each asset type that contains more than 25 instances.[/INST] SQL query: select asset_type_id, count(*) as c1 from asset group by type_id having c1 > 25
[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 ; relation_has: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; relation_has_table_col: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Count the number of columns for each table that has more than 15 columns.[/INST] SQL query: select t1.asset_id, t1.asset_short_name, count(*) as c1 from asset_table as t1 join relation_has_table_col as t2 on t1.asset_id = t2.source_asset_id group by t1.asset_id, t1.asset_short_name having c1 > 15
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; 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 ; English query: For each owner account that owns more than 25 business terms, show the number of business terms owned.[/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 having c1 > 25
[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_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; 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 ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; English query: Order all classification labels by creation date.[/INST] SQL query: select asset_short_name, creation_date from asset_classification order by creation_date asc
[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_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; relation_derive_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 ; English query: How many tables are derived from the table 'nycc'?[/INST] SQL query: select count(*) from asset_table as t1 join relation_derive_table_table as t2 on t1.asset_id = t1.source_asset_id join asset_table as t3 on t2.target_asset_id = t3.asset_id where t1.asset_short_name = 'nycc'
[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_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: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_unionable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Sort all assets by asset id.[/INST] SQL query: select asset_short_name, asset_id from asset order by asset_id 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 ; asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset_column: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date col_type col_length ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Give me 10 asset names from the data lake.[/INST] SQL query: select asset_short_name from asset limit 10
[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: 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_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 ; English query: Show all the details for all the tables in the lake.[/INST] SQL query: select * from asset_table
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; relation_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 ; relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Sort all files by size and display extensions and descriptions.[/INST] SQL query: select asset_short_name, extension, description, fsize from asset_file order by fsize desc
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; 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: 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: Display all records for any 10 assets in the lake.[/INST] SQL query: select * from asset limit 10
[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_nosql: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; asset_business_term: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; relation_has_dir_file: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; relation_joinable_table_table: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; English query: Which folders have more than 100 files?[/INST] SQL query: select t1.asset_short_name, count(*) as c1 from asset_directory as t1 join relation_has_dir_file as t2 on t1.asset_id = t2.source_asset_id group by t2.source_asset_id having c1 > 100
[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_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 ; asset_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; asset_owner: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: How many assets does the user ‘jdoe’ own?[/INST] SQL query: select count(*) from asset_owner as t1 join relation_own as t2 on t1.asset_id = t2.source_asset_id where t1.asset_short_name = ‘jdoe’
[INST] <<SYS>>Translate english queries to SQL.<</SYS>> Schema: relation_assoc: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_table: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date num_cols num_rows ; relation_own: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_label: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; asset: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date ; English query: Show all metadata for label association relationships.[/INST] SQL query: select * from relation_assoc
[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: relation_id relation_type_id source_asset_id target_asset_id description creation_date modified_date ; asset_file: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date extension fsize ; asset_directory: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date dsize ; asset_rdbms: asset_id asset_type_id asset_short_name asset_long_name description synonyms creation_date modified_date database_type num_tables ; English query: List all the files in the lake.[/INST] SQL query: select asset_short_name from asset_file