system stringlengths 2.68k 8.8k | conversations listlengths 4 34 |
|---|---|
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE trading_platform.logs ( log_id text PRIMARY KEY, user_id text, action text, details t... | [
{
"role": "user",
"content": "Count the number of logs for each action type."
},
{
"role": "assistant",
"content": "SELECT action,\n COUNT(*) AS count\nFROM trading_platform.logs\nGROUP BY action;"
},
{
"role": "user",
"content": "What is the reason for the termination of emplo... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. You are an expert in writing database language and you can refuse the user's question if the question is not related... | [
{
"role": "user",
"content": "What is the reason behind the cost variation for maintenance of asset_id 'ASSET456' over the past year?"
},
{
"role": "assistant",
"content": "I'm sorry, but I can't provide information on the reasons behind cost variations for maintenance. The data in the maintenan... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. You are an expert in writing database language and you can refuse the user's question if the question is not related... | [
{
"role": "user",
"content": "What is the average delay time for trains departing from platform 4 at station LMN during the past year?"
},
{
"role": "assistant",
"content": "I'm sorry, but I can't provide information on train delay times as this data is not stored in the platforms table. The tab... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. You are an expert in writing database language and you can refuse the user's question if the question is not related... | [
{
"role": "user",
"content": "What are the environmental impact assessments for the production of the Airbus A350 model?"
},
{
"role": "assistant",
"content": "I'm sorry, but I don't have access to data regarding the environmental impact assessments for the production of specific aircraft models... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE insurance.insurance_products ( product_id.text, product_name.text, product_type.text,... | [
{
"role": "user",
"content": "What are the top 5 product types by average base premium, showing the product_type and average base_premium, ordered by average base_premium descending?"
},
{
"role": "assistant",
"content": "SELECT product_type, AVG(base_premium) AS avg_premium FROM insurance.insur... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. You are an expert in writing database language and you can refuse the user's question if the question is not related... | [
{
"role": "user",
"content": "What is the manufacturing date of the train car with car_id 'CAR789'?"
},
{
"role": "assistant",
"content": "I'm sorry, but I don't have access to information about the manufacturing date of train cars. The data available in the train_cars table only includes detail... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE insurance.insurance_products ( product_id text PRIMARY KEY, product_name text, produc... | [
{
"role": "user",
"content": "Retrieve the count of active insurance products for each product_type and order the results by the count descending."
},
{
"role": "assistant",
"content": "SELECT product_type,\n COUNT(*) AS active_count\nFROM insurance.insurance_products\nWHERE is_active = TR... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE social_media.conversations ( conversation_id character varying(64) NOT NULL, created_... | [
{
"role": "user",
"content": "Provide a breakdown of the total number of conversations, showing how many are group chats and how many are not. Also, show the count of conversations that have a recorded last message time."
},
{
"role": "assistant",
"content": "SELECT COUNT(*) AS total_conversatio... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE web3.users ( user_id.text, username.text, email.text, password_hash.text, created_at.... | [
{
"role": "user",
"content": "For each user, show how many users registered after them. Return the user_id, username, and the count of later registrants."
},
{
"role": "assistant",
"content": "SELECT u1.user_id, u1.username, COUNT(u2.user_id) AS later_user_count FROM web3.users u1 LEFT JOIN web3... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE web3.tokens (
token_id character varying(64) NOT NULL, -- unique identifier for ... | [
{
"role": "user",
"content": "List the token symbol and name for all tokens whose associated contract address has emitted at least one event. Also include the contract address."
},
{
"role": "assistant",
"content": "SELECT T.token_symbol, T.token_name, T.contract_address FROM web3.tokens AS T JO... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE legal_services.lawyers ( lawyer_id.text, first_name.text, last_name.text, bar_number.... | [
{
"role": "user",
"content": "List all invoices that were paid within 7 days of their issue date. Show invoice number, issue date, payment date, and total amount."
},
{
"role": "assistant",
"content": "SELECT invoice_number, issue_date, payment_date, total_amount FROM legal_services.invoices WHE... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE healthcare.patient_insurance ( patient_insurance_id text, patient_id text, plan_id te... | [
{
"role": "user",
"content": "How many insurance policies have 'Group' in their group_number?"
},
{
"role": "assistant",
"content": "SELECT COUNT(*) FROM healthcare.patient_insurance WHERE group_number ILIKE '%Group%';"
},
{
"role": "user",
"content": "List all pairs of wallets that ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE web3.tokens (
token_id character varying(64) NOT NULL, -- unique identifier for ... | [
{
"role": "user",
"content": "For each token, show its token_id, decimals, and the average total_supply of all tokens with the same decimals."
},
{
"role": "assistant",
"content": "SELECT t.token_id,\n t.decimals,\n avg_data.avg_total_supply\nFROM web3.tokens t\nJOIN (\n SELECT deci... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE blockchain.smart_contracts ( contract_id.text, creator_address.text, code.text, times... | [
{
"role": "user",
"content": "Find all smart contracts where the contract code contains the keyword 'proxy'."
},
{
"role": "assistant",
"content": "SELECT contract_id, creator_address, timestamp FROM blockchain.smart_contracts WHERE code LIKE '%proxy%';"
},
{
"role": "user",
"content... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE transportation.routes ( route_id.text, route_number.text, description.text, origin_lo... | [
{
"role": "user",
"content": "List all pairs of routes where the origin location of one route is the destination location of the other, showing both route numbers and their types."
},
{
"role": "assistant",
"content": "SELECT r1.route_number AS route_number_1, r1.type AS type_1,\n r2.route... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE healthcare.insurance_plans ( plan_id text PRIMARY KEY, plan_name text, insurance_prov... | [
{
"role": "user",
"content": "Provide each pair of plans that share the same plan_type but are offered by different providers."
},
{
"role": "assistant",
"content": "SELECT p1.plan_type,\n p1.plan_id AS plan1_id,\n p1.plan_name AS plan1_name,\n p1.insurance_provider AS provider... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE web3.token_transfers ( transfer_id text PRIMARY KEY, token_id text, from_address text... | [
{
"role": "user",
"content": "List all pairs of token transfers occurring within the same transaction where one transferred value is greater than the other, showing both transfer IDs, the transaction ID, and both values."
},
{
"role": "assistant",
"content": "SELECT t1.transaction_id,\n t1... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE insurance.insurance_products ( product_id text PRIMARY KEY, product_name text, produc... | [
{
"role": "user",
"content": "List all insurance products along with their product types and the date they were last updated, but only include products where the base premium is greater than 2000."
},
{
"role": "assistant",
"content": "SELECT product_id, product_name, product_type, updated_at\nF... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE legal_services.invoices ( invoice_id.text, invoice_number.text, client_id.text, case_... | [
{
"role": "user",
"content": "Count the total number of invoices issued in each calendar year and month. Show the year, month, and the count, ordered chronologically."
},
{
"role": "assistant",
"content": "SELECT EXTRACT(YEAR FROM issue_date) AS issue_year, EXTRACT(MONTH FROM issue_date) AS issu... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE legal_services.law_firms ( firm_id character varying(64) NOT NULL, firm_name characte... | [
{
"role": "user",
"content": "List all law firms founded in the year 2015. Show their names, phone numbers, and website."
},
{
"role": "assistant",
"content": "SELECT firm_name, phone, website\nFROM legal_services.law_firms\nWHERE EXTRACT(YEAR FROM founded_date) = 2015;"
},
{
"role": "us... |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 2