system stringlengths 315 8.44k | conversations listlengths 2 8 |
|---|---|
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.drivers ( driver_id text PRIMARY KEY, employee_id text, first_name te... | [
{
"role": "user",
"content": "List all pairs of drivers whose license_expiry_date falls in the same month and year. Display the first and last names of both drivers as driver1_first, driver1_last, driver2_first, driver2_last, and the shared year and month as expiry_year and expiry_month.",
"sql": null
... |
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.time_entries (
entry_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "Show me the total hours and total billed amount for each lawyer and each case, including the lawyer_id and case_id.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT lawyer_id, case_id, SUM(hours_spent) AS total_hours, SUM(hours_spent * billing_rate) AS... |
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, produ... | [
{
"role": "user",
"content": "Give me the product name and description of all insurance products that have been updated in the last 30 days.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT product_name, description FROM insurance.insurance_products WHERE updated_at >= NOW() - INTE... |
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.customers ( customer_id text PRIMARY KEY, first_name text, last_name text,... | [
{
"role": "user",
"content": "Show me the first and last names of customers who have purchased a policy for an insurance product of type 'travel', along with the policy number and product name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.first_name, c.last_name, p.policy_num... |
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.users ( user_id character varying(64) NOT NULL, username character ... | [
{
"role": "user",
"content": "For each user, show their username and the total number of 'sell' orders they've placed, including users who haven't placed any.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.username,\n COUNT(o.order_id) FILTER (WHERE o.order_type = 'sell')... |
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, token_id text, from_address text, to_addres... | [
{
"role": "user",
"content": "Which addresses have both sent and received tokens? List them.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT t1.from_address FROM web3.token_transfers t1 INNER JOIN web3.token_transfers t2 ON t1.from_address = t2.to_address;",
"sql": nu... |
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.customers ( customer_id.text, first_name.text, last_name.text, date_of_bir... | [
{
"role": "user",
"content": "Show all claim documents uploaded in 2024 with their document_id, file_name, uploaded_at, and the claim_id.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT document_id, file_name, uploaded_at, claim_id\nFROM insurance.claim_documents\nWHERE uploaded_a... |
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 token_metas ( block_timestamp timestamp(6) NOT NULL, block_number bigint NOT NULL, t... | [
{
"role": "user",
"content": "List the token IDs and names of all NFTs minted by the wallet '0x1234...' on Ethereum.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT token_id, name FROM nft_metadata WHERE minter = '0x1234...' AND blockchain = 'Ethereum';",
"sql": null
},
{
... |
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.drivers ( driver_id text PRIMARY KEY, employee_id text, first_name te... | [
{
"role": "user",
"content": "Retrieve the route number and description for routes whose estimated duration exceeds 120 minutes.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT route_number, description\nFROM transportation.routes\nWHERE estimated_duration_minutes > 120;",
"sq... |
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 government_services.agencies ( agency_id text PRIMARY KEY, agency_name text, jurisdi... | [
{
"role": "user",
"content": "For each employee, retrieve their full name and the number of appointments scheduled for them in the next 7 days, including employees with no appointments.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT e.first_name || ' ' || e.last_name AS full_name... |
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.t... | [
{
"role": "user",
"content": "How many active insurance policies are there for each plan_id? Show plan_id and active_count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT plan_id,\n COUNT(*) AS active_count\nFROM healthcare.patient_insurance\nWHERE expiration_date IS NULL O... |
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.clients (
client_id character varying(64) NOT NULL, -- unique id... | [
{
"role": "user",
"content": "Show me the first name, last name, and email for all clients registered in January 2023.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT first_name, last_name, email FROM legal_services.clients WHERE EXTRACT(YEAR FROM date_registered) = 2023 AND EXTRA... |
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 narrative_info ( narrative.text, top_3_coins.text, price_change_percentage_1h.numeri... | [
{
"role": "user",
"content": "List the top 5 exchanges with the highest total USD value of tokens held on the 'Ethereum' chain for the latest snapshot time.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT exchange, SUM(usd_value) AS TotalUSDValue FROM cex_token_balance WHERE chain... |
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.claim_documents ( document_id character varying(64) NOT NULL, claim_id cha... | [
{
"role": "user",
"content": "Find the claim ID and the total number of documents associated with each claim ID that has more than 10 documents.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT claim_id, COUNT(*) FROM insurance.claim_documents GROUP BY claim_id HAVING COUNT(*) > 10... |
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.users ( user_id character varying(64) NOT NULL, username character vary... | [
{
"role": "user",
"content": "List group conversation names and the IDs of notifications associated with them, where the notification type is 'mention'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.group_name, T2.notification_id FROM social_media.conversations AS T1 INNER 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 project_fundraising_record ( id character varying(32) NOT NULL, project_id character... | [
{
"role": "user",
"content": "Can you list each fundraising round name along with the project that raised the smallest amount in that round? Show the project name, round, and investment value.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT t1.rounds_name, t1.project_name, t1.inve... |
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.transactions ( transaction_id text, from_address text, to_address text, value n... | [
{
"role": "user",
"content": "List all failed transactions where the gas_used is greater than 100,000, including the transaction_id and timestamp.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT transaction_id, timestamp FROM web3.transactions WHERE status = 'failed' AND gas_used ... |
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.passengers (
passenger_id character varying(64) NOT NULL, -- uni... | [
{
"role": "user",
"content": "Please show me the first name, last name, and date of birth for all passengers born before January 1, 1990.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT first_name, last_name, date_of_birth FROM transportation.passengers WHERE date_of_birth < '1990... |
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 nft_holders ( block_number bigint NOT NULL, contract_address varchar NOT NULL, walle... | [
{
"role": "user",
"content": "Show all SUI coins with 'exists' status and more than 8 decimal places. Display coin_type, symbol, name, and decimals.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT coin_type, symbol, name, decimals\nFROM sui_coins_metadata\nWHERE status = 'exists' ... |
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.customers ( customer_id text PRIMARY KEY, first_name text, last_name text,... | [
{
"role": "user",
"content": "Show the policy number, start date, and the first and last name of the agent for all policies that started in 2024.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.policy_number, p.start_date, a.first_name AS agent_first_name, a.last_name AS agent_l... |
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 erc1155_approval_for_all ( block_number bigint, block_timestamp timestamp, transacti... | [
{
"role": "user",
"content": "Show me the historical balance entries for wallet address '0xabc...' and contract address '0xdef...', including the block number and amount.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT block_number, amount FROM erc20_balances_historical WHERE wall... |
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.users ( user_id character varying(64) NOT NULL, username character vary... | [
{
"role": "user",
"content": "List the usernames and the IDs of conversations they have joined.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.username, T2.conversation_id FROM social_media.users AS T1 JOIN social_media.conversation_participants AS T2 ON T1.user_id = T2.user_i... |
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.wallets ( wallet_id text, user_id text, address text, private_key t... | [
{
"role": "user",
"content": "List all assets with their name, symbol, and type where the asset type is 'token'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT name, symbol, type FROM trading_platform.assets WHERE type = 'token';",
"sql": null
}
] |
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.events (
event_id character varying(64) NOT NULL, -- unique identifier for... | [
{
"role": "user",
"content": "List events from contract '0xContractA...' that occurred between '2023-01-01' and '2023-01-31'. Show the event ID, event name, and emitted timestamp.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT event_id, event_name, emitted_at FROM web3.events 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.doctors ( doctor_id character varying(64) NOT NULL, first_name character ... | [
{
"role": "user",
"content": "Show all prescriptions with prescription_id, patient_id, medication_id, quantity_dispensed, and refills_allowed.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT prescription_id, patient_id, medication_id, quantity_dispensed, refills_allowed FROM healt... |
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.vehicles ( vehicle_id text PRIMARY KEY, license_plate text, vin text,... | [
{
"role": "user",
"content": "For each route, show the route number and the total number of trips associated with it.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T2.route_number, count(T1.trip_id) FROM transportation.trips AS T1 JOIN transportation.routes AS T2 ON T1.route_id ... |
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 character varying(64) NOT NULL, -- unique id... | [
{
"role": "user",
"content": "Find all invoices with status 'Paid' where the total amount is between 2000 and 5000. Show invoice number, total amount, issue date, and due date. Sort the results by issue date descending.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT invoice_numbe... |
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 financial_services.transactions (
transaction_id character varying(64) NOT NULL,... | [
{
"role": "user",
"content": "For each transaction, show the transaction_id, amount, and the number of other transactions that have the same related_account_id and happened on the same effective_date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT t1.transaction_id, t1.amount, (S... |
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_pro... | [
{
"role": "user",
"content": "List all plan names and their contact numbers for plans of type 'HMO' offered by 'Sunrise Insurance'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT plan_name, contact_phone FROM healthcare.insurance_plans WHERE plan_type = 'HMO' AND insurance_provid... |
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.vehicles ( vehicle_id text PRIMARY KEY, license_plate text, vin text,... | [
{
"role": "user",
"content": "Retrieve the daily total fare collected for bookings with status 'Completed' in March 2024. Display the booking_date and total_fare.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n DATE(booking_time) AS booking_date,\n SUM(fare) AS total_fare\nFRO... |
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 character varying(64) NOT NU... | [
{
"role": "user",
"content": "Count how many non-primary insurance policies have a group number specified.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(*) FROM healthcare.patient_insurance WHERE is_primary = FALSE AND group_number IS NOT NULL;",
"sql": null
}
] |
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 government_services.citizens (
citizen_id character varying(64) NOT NULL, -- un... | [
{
"role": "user",
"content": "I need to get the number of active services offered at each accessible service location. Please include location_name and city.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT sl.location_name, sl.city, COUNT(s.service_id) AS active_service_count\nFRO... |
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.agents ( agent_id text, first_name text, last_name text, agency_name text,... | [
{
"role": "user",
"content": "I need a report of how many documents each agent has uploaded in the past month. Include agent_id, agent full name, and the document count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.agent_id, a.first_name || ' ' || a.last_name AS full_name, CO... |
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 financial_services.accounts ( account_id text, customer_id text, account_number text... | [
{
"role": "user",
"content": "For each account, show account_number, customer_id, and the count of other accounts the same customer has.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.account_number, a.customer_id, COUNT(b.account_id) AS other_account_count FROM financial_servi... |
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 gaming_technology.players ( player_id uuid, username text, email text, password_hash... | [
{
"role": "user",
"content": "How can I calculate how many years each developer has been in business based on their founded_year?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT name,\n EXTRACT(year FROM age(CURRENT_DATE, make_date(founded_year, 1, 1))) AS years_in_business\... |
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.vehicles ( vehicle_id text PRIMARY KEY, license_plate text, vin text,... | [
{
"role": "user",
"content": "List each passenger's first_name, last_name, and booking_id along with the total quantity of fuel consumed on their trip for July 1, 2024.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n p.first_name,\n p.last_name,\n b.booking_id,\n SUM(fl.quan... |
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.customers ( customer_id text, first_name text, last_name text, date_of_bir... | [
{
"role": "user",
"content": "Return the customer_id, full name, policy_id, and start date of all policies sold by agents whose commission_rate is less than 0.08. Please also include the product_name of the related insurance product.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT... |
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 gaming_technology.achievements ( achievement_id uuid, game_id uuid, name text, descr... | [
{
"role": "user",
"content": "Get name pairs of achievements for each game where one is hidden and the other is visible.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.achievement_id AS hidden_achievement_id, a.name AS hidden_name, b.achievement_id AS visible_achievement_id, b.... |
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 gaming_technology.players (
player_id uuid NOT NULL DEFAULT gen_random_uuid(), -... | [
{
"role": "user",
"content": "Show a list of all game developers with their name and founded year.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n name,\n founded_year\nFROM gaming_technology.developers;",
"sql": null
},
{
"role": "user",
"content": "Please fil... |
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 hospitality_technology.properties ( property_id text, property_name text, address_li... | [
{
"role": "user",
"content": "Retrieve all reservations with status 'Cancelled' and show the reservation_id, property_name, and room_type_name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT res.reservation_id,\n p.property_name,\n rt.type_name AS room_type_name\nFROM... |
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 gaming_technology.players ( player_id uuid PRIMARY KEY, username text, email text, p... | [
{
"role": "user",
"content": "List each server region and the number of online servers in that region.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT region,\n COUNT(*) AS online_servers\nFROM gaming_technology.servers\nWHERE status = 'online'\nGROUP BY region;",
"sql":... |
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 token_dexpool_info ( pair_address character varying(512) NOT NULL, -- the id of dexp... | [
{
"role": "user",
"content": "Which three tokens on the Arbitrum chain have the lowest 6-hour price change percentage?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT token_symbol, price_change_percentage_6h FROM token_dexpool_info WHERE chain = 'Arbitrum' ORDER BY price_change_pe... |
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 hospitality_technology.properties ( property_id character varying(64) NOT NULL, prop... | [
{
"role": "user",
"content": "For each guest, show their full name and the total quantity of services they have ordered in the last 30 days.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT g.guest_id,\n g.first_name || ' ' || g.last_name AS full_name,\n SUM(so.quantity... |
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.doctors ( doctor_id text, first_name text, last_name text, specialty text... | [
{
"role": "user",
"content": "List the first and last names of all doctors whose email address ends with '@hospital.org'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT first_name, last_name FROM healthcare.doctors WHERE email LIKE '%@hospital.org';",
"sql": null
}
] |
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.users (
user_id character varying(64) NOT NULL, -- unique identifi... | [
{
"role": "user",
"content": "List all hashtags that have never been associated with any post, showing hashtag_id and tag_name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT h.hashtag_id, h.tag_name\nFROM social_media.hashtags h\nLEFT JOIN social_media.post_hashtags ph ON h.hash... |
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 government_services.services (
service_id character varying(64) NOT NULL, -- uni... | [
{
"role": "user",
"content": "For all scheduled appointments in the next 14 days, list the appointment ID, scheduled start time, the name of the service, and the standard fee.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.appointment_id, a.scheduled_start_time, s.service_name,... |
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.appointments ( appointment_id text, patient_id text, doctor_id text, appo... | [
{
"role": "user",
"content": "For each patient, show the total number of diagnoses they have received, along with their patient ID and the ID of their latest diagnosis. Join with the diagnoses table.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT patient_id, COUNT(diagnosis_id) A... |
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 erc1155_approval_for_all (
block_number bigint NOT NULL, -- Block number contain... | [
{
"role": "user",
"content": "Which ERC1155 NFT contracts have received approval-for-all events, and for each contract, how many total approval events were recorded?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT contract_address, COUNT(*) AS approval_count FROM erc1155_approval_... |
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 government_services.citizens ( citizen_id text, national_id_number text, first_name ... | [
{
"role": "user",
"content": "List the first name and last name of employees who have verified documents, along with the document type they verified and the verification status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT e.first_name, e.last_name, d.document_type, d.verificat... |
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.clients ( client_id text, first_name text, last_name text, company_na... | [
{
"role": "user",
"content": "How many clients registered in each month of 2024? Provide the month (YYYY-MM) and the number of registrations.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT TO_CHAR(date_registered, 'YYYY-MM') AS month, COUNT(*) AS registration_count FROM legal_ser... |
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.users ( user_id character varying(64) NOT NULL, username character ... | [
{
"role": "user",
"content": "List all users, showing their user ID, username, and the total number of wallets they have created. Include users who have no wallets.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.user_id, u.username, COUNT(w.wallet_id) AS wallet_count FROM tradi... |
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 government_services.agencies ( agency_id character varying(64) NOT NULL, agency_name... | [
{
"role": "user",
"content": "Which agencies have at least one service with a standard fee equal to zero? Show the agency name and the service name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.agency_name, s.service_name\nFROM government_services.agencies a\nJOIN government_... |
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 smart_money_profit ( address character varying(100) NOT NULL, rank INT, profit numer... | [
{
"role": "user",
"content": "Show me the top 5 smart money addresses by profit on the Ethereum chain, along with their most profitable token and ROI, but only include addresses with a realized profit ratio above 80%.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT address, most_p... |
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.policies ( policy_id text PRIMARY KEY, customer_id text, product_id text, ... | [
{
"role": "user",
"content": "List policy pairs for the same customer where one policy was cancelled and another active policy started within 30 days after the cancellation. Show customer_id, cancelled policy_number, cancellation_date, active policy_number, start_date.",
"sql": null
},
{
"role":... |
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.customers (
customer_id character varying(64) NOT NULL, -- unique ide... | [
{
"role": "user",
"content": "List all agents who have a commission rate above 0.1, showing their full names and agency names.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT agent_id, first_name || ' ' || last_name AS full_name, agency_name, commission_rate FROM insurance.agents ... |
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 PRIMARY KEY, route_number text, description te... | [
{
"role": "user",
"content": "Show all maintenance logs with the vehicle ID, service date, service type, and the name and city of the location where the vehicle's most recent fueling occurred.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT ml.log_id, ml.vehicle_id, ml.service_dat... |
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.vehicles (
vehicle_id character varying(64) NOT NULL, -- unique ... | [
{
"role": "user",
"content": "Retrieve each completed booking's booking_id, passenger full name, trip_id, scheduled_departure, and fare for bookings where the trip's passenger_count is at least 10.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT b.booking_id, p.first_name || ' ' |... |
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 smart_money_token_inflow ( token_address character varying(100) NOT NULL, -- the tok... | [
{
"role": "user",
"content": "What are the top 3 narratives by average USD purchase value per address (for buy transactions) across all chains?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT narrative, AVG(usd_value::float / NULLIF(address_amount,0)) AS avg_usd_per_address\nFROM ... |
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 character varying(64) NOT NULL, -- unique id... | [
{
"role": "user",
"content": "Find all addresses that have both sent and received tokens. For each, show the address, the total value sent, and the total value received.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s.address, s.total_sent, r.total_received\nFROM (\n SELECT fro... |
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 government_services.citizens (
citizen_id character varying(64) NOT NULL, -- un... | [
{
"role": "user",
"content": "Provide a count of citizens registered per calendar year.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT CAST(EXTRACT(YEAR FROM registration_date) AS INTEGER) AS registration_year, COUNT(*) AS citizen_count FROM government_services.citizens GROUP BY ... |
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 financial_services.accounts ( account_id.text, customer_id.text, account_number.text... | [
{
"role": "user",
"content": "Show each customer's checking and savings account numbers for customers who have both types.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.customer_id,\n a.account_number AS checking_account,\n b.account_number AS savings_account\nFROM... |
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.customers ( customer_id text, first_name text, last_name text, date_of_bir... | [
{
"role": "user",
"content": "For each claim, show the claim ID, incident date, the customer's first and last name, and the policy number under which it was filed.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT cl.claim_id, cl.incident_date, c.first_name AS customer_first_name, c... |
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.contracts (
contract_id character varying(64) NOT NULL, -- unique identifi... | [
{
"role": "user",
"content": "Show each contract's address along with the total number of events it has emitted and the total number of transactions sent to it.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n c.address,\n COUNT(e.event_id) AS event_count,\n COUNT(t.transactio... |
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.vehicles ( vehicle_id character varying(64) NOT NULL, license_plate c... | [
{
"role": "user",
"content": "Show me all diesel vehicles with a capacity greater than 20, including their make, model, and year.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT vehicle_id, make, model, year, capacity FROM transportation.vehicles WHERE fuel_type = 'diesel' AND cap... |
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 gaming_technology.games ( game_id.uuid, title.text, developer_id.uuid, publisher_id.... | [
{
"role": "user",
"content": "For each game, show the game title, the total duration of all sessions in seconds, and the average score.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT g.title, SUM(gs.duration_seconds) AS total_duration_seconds, AVG(gs.score) AS average_score FROM ... |
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 government_services.services ( service_id character varying(64) NOT NULL, agency_id ... | [
{
"role": "user",
"content": "For each service category, count the number of appointments scheduled in the next 7 days. Return the category and appointment count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s.category, COUNT(a.appointment_id) AS upcoming_appointments\nFROM gov... |
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.contracts ( contract_id text, address text, abi text, bytecode text, deployer_a... | [
{
"role": "user",
"content": "For each contract, can you list the token symbols and total supply of all tokens created by that contract, along with the contract's current status?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.contract_id, c.address AS contract_address, c.status... |
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.transactions (
transaction_id character varying(64) NOT NULL, -- uni... | [
{
"role": "user",
"content": "Show me transactions where the sender and receiver addresses are the same. List transaction_id, amount, and timestamp.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT transaction_id, amount, timestamp FROM blockchain.transactions WHERE sender_address ... |
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.appointments ( appointment_id.text, client_id.text, lawyer_id.text, c... | [
{
"role": "user",
"content": "How many appointments were created in the month of July 2024?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(*) AS appointment_count\nFROM legal_services.appointments\nWHERE DATE_TRUNC('month', created_at) = DATE '2024-07-01';",
"sql": null... |
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 gaming_technology.servers ( server_id uuid NOT NULL DEFAULT gen_random_uuid(), game_... | [
{
"role": "user",
"content": "List all servers that are currently online. Show their name, region, current player count, and maximum player capacity.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT server_name, region, current_players, max_players FROM gaming_technology.servers WH... |
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.policies ( policy_id character varying(64) NOT NULL, customer_id character... | [
{
"role": "user",
"content": "Show all policies that started before January 1, 2022, including policy_id, policy_number, start_date, and status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT policy_id, policy_number, start_date, status\nFROM insurance.policies\nWHERE start_date ... |
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 hospitality_technology.reviews ( review_id text PRIMARY KEY, property_id text, reser... | [
{
"role": "user",
"content": "Find all review comments that have a staff response, showing the comment and the staff response date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT comment, response_date FROM reviews WHERE response_date IS NOT NULL;",
"sql": null
},
{
"... |
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.users ( user_id character varying(64) NOT NULL, username character vary... | [
{
"role": "user",
"content": "List all posts that have never received a comment. Return post_id and user_id.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.post_id, p.user_id FROM social_media.posts p WHERE NOT EXISTS (SELECT 1 FROM social_media.comments c WHERE c.post_id = p.p... |
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.users ( user_id text PRIMARY KEY, username text, email text, passwo... | [
{
"role": "user",
"content": "Show me the usernames and emails of all users who have placed at least one 'buy' order for the asset named 'Bitcoin'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT T1.username, T1.email FROM trading_platform.users AS T1 JOIN trading_platfor... |
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
Collection 'inspections'. Document structure: { _id: <ObjectId (or inspection_id)>, inspection_id... | [
{
"role": "user",
"content": "I need to get a count of inspections performed by each inspector, including their employee ID and the total number of inspections they have conducted.",
"sql": null
},
{
"role": "assistant",
"content": "db.inspections.aggregate([{ $group: { _id: '$inspector_empl... |
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 hospitality_technology.services (
service_id character varying(64) NOT NULL, -- ... | [
{
"role": "user",
"content": "Retrieve service_id, service_name, price, and unit for all services in the 'Wellness' category priced between 30 and 100.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT service_id,\n service_name,\n price,\n unit\nFROM hospitality_t... |
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 hospitality_technology.services ( service_id text PRIMARY KEY, property_id text, ser... | [
{
"role": "user",
"content": "Get all pairs of services from the same department where one service is more expensive than another. Show department, service1_name, price1, service2_name, price2.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s1.department, s1.service_name AS servi... |
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 project_fundraising_record ( id character varying(32) NOT NULL, -- fundraising reco... | [
{
"role": "user",
"content": "Show me the top 5 projects by valuation that completed fundraising rounds in the last 6 months, along with their narrative information if available.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT pfr.project_name, pfr.rounds_name, pfr.valuation, pfr.... |
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 cex_token_balance (",
"snapshot_time character varying(32) NOT NULL, -- the ... | [
{
"role": "user",
"content": "For the latest snapshot time, list the total `usd_value` held by CEXes for each distinct `token_symbol` across all chains. Order the results by total value descending.",
"sql": null
},
{
"role": "assistant",
"content": "WITH latest_snapshot AS (\n SELECT max(sn... |
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": "List all invoice numbers and their total amount for invoices that are overdue. Show the client ID and the due date as well.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT invoice_number, total_amount, client_id, due_date FROM legal_services.invoices ... |
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.metadata ( metadata_id text, asset_id text, key text, value text )
... | [
{
"role": "user",
"content": "Which assets have at least two different types of metadata keys, and for each asset, list its asset_id and a comma-separated list of the unique keys?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT asset_id, string_agg(DISTINCT key, ', ') AS unique_ke... |
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.maintenance_logs ( log_id text, vehicle_id text, service_date date, o... | [
{
"role": "user",
"content": "Show me every unique combination of mechanic and service type that has performed maintenance, and the total number of such services per combination.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT mechanic_name, service_type, COUNT(*) AS total_service... |
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_l... | [
{
"role": "user",
"content": "Show all trips, including the trip ID, vehicle license plate, and the vehicle's capacity.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT t.trip_id, v.license_plate, v.capacity FROM transportation.trips t JOIN vehicles v ON t.vehicle_id = v.vehicle_id... |
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 hospitality_technology.properties ( property_id character varying(64) NOT NULL, prop... | [
{
"role": "user",
"content": "List all active staff members who are managers, along with their hire dates and email addresses.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT staff_id, first_name, last_name, position, work_email, hire_date FROM hospitality_technology.staff WHERE i... |
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. 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
CREA... | [
{
"role": "user",
"content": "What are the ticket prices for trains departing from the station with ID 'ST456'?",
"sql": null
},
{
"role": "assistant",
"content": "I'm sorry, but I can't provide information on ticket prices as this data is not included in the station management database. For... |
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 character varying(64) NOT NULL, -- unique id... | [
{
"role": "user",
"content": "List all pairs of token transfers where the sender is the same but the recipients differ. Show both transfer IDs and the common sender address.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT t1.transfer_id AS transfer_id_1, t2.transfer_id AS transfer... |
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 financial_services.customers ( customer_id text PRIMARY KEY, first_name text, last_n... | [
{
"role": "user",
"content": "Which customers have traded securities with the highest average trading amount per trade across all their accounts? Show me the customer full name, email, and the average trade amount for each customer.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT ... |
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.contracts ( contract_id character varying(64) NOT NULL, address character varyi... | [
{
"role": "user",
"content": "Get the total value and average gas_price for each from_address in transactions, but only include senders who have sent more than 5 transactions.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT from_address,\n SUM(value) AS total_value,\n ... |
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 government_services.documents (
document_id character varying(64) NOT NULL, -- u... | [
{
"role": "user",
"content": "Find the citizen ID and document ID for documents with a 'Proof of Address' document type, for citizens who have also received at least one notification. Show distinct combinations.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT d.citizen_id... |
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.transactions ( transaction_id character varying(64) NOT NULL, from_address char... | [
{
"role": "user",
"content": "Retrieve all transactions where the total value of token transfers in that transaction exceeds the Ether value of the transaction itself. Include transaction_id, ether_value, and total_token_value.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n t.... |
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.patients ( patient_id text, first_name text, last_name text, date_of_birt... | [
{
"role": "user",
"content": "Show the patient ID, first name, last name, and email for all patients who have provided both an email address and a phone number.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT patient_id, first_name, last_name, email FROM healthcare.patients WHERE ... |
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 gaming_technology.players (
player_id uuid NOT NULL DEFAULT gen_random_uuid(), -... | [
{
"role": "user",
"content": "List each player's ID, username, and the count of items of type 'Consumable' in their inventory. Only include players who have any consumable items.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.player_id, p.username, COUNT(pi.item_id) AS consumab... |
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.vehicles (
vehicle_id character varying(64) NOT NULL, -- unique ... | [
{
"role": "user",
"content": "List the number of trips and the average passenger count per vehicle.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT v.vehicle_id, COUNT(t.trip_id) AS trip_count, AVG(t.passenger_count) AS avg_passenger_count\nFROM transportation.vehicles v\nLEFT JOI... |
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 character varying(64) NOT NULL, -- unique ... | [
{
"role": "user",
"content": "Show me all invoices, displaying their invoice number and the payment date, for invoices that have been fully paid.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT invoice_number, payment_date FROM legal_services.invoices WHERE status = 'Paid';",
... |
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 hospitality_technology.staff ( staff_id character varying(64) NOT NULL, property_id ... | [
{
"role": "user",
"content": "Show me each staff member's first and last name along with their manager's first and last name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s.staff_id,\n s.first_name,\n s.last_name,\n m.staff_id AS manager_id,\n m.first_na... |
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 character varying(64) NOT NULL, first_name charac... | [
{
"role": "user",
"content": "Find pairs of lawyers who work for the same firm AND share the same specialization, excluding pairs where the lawyer IDs are the same. Show their first names, last names, firm ID, and specialization. Order the results by firm ID and then specialization.",
"sql": null
},
... |
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, plan_name text, insurance_provider text, ... | [
{
"role": "user",
"content": "Find all insurance plans that have both a contact phone number and a website listed, showing their provider and plan type.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT insurance_provider, plan_type FROM healthcare.insurance_plans WHERE contact_phon... |
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. 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
CREA... | [
{
"role": "user",
"content": "What is the current location of a specific train car with car_id 'TC123'?",
"sql": null
},
{
"role": "assistant",
"content": "I'm sorry, but I can't provide the current location of a specific train car as this information is not stored in the database table. The... |
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 hospitality_technology.reservations ( reservation_id.text, property_id.text, guest_i... | [
{
"role": "user",
"content": "List all pairs of overlapping reservations for the same room, including both reservation IDs, room ID, and each reservation's check-in and check-out dates.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT r1.reservation_id AS reservation1_id,\n r... |
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.customers (
customer_id character varying(64) NOT NULL, -- unique ide... | [
{
"role": "user",
"content": "Give a list of all policies where the deductible is less than 1000. Show policy_id, policy_number, start_date, and deductible.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT policy_id, policy_number, start_date, deductible\nFROM insurance.policies\nW... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.