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
Use Hashes. Key pattern: 'inv:<inventory_record_id>'. Example: HSET inv:INVREC500 component_id "c... | [
{
"role": "user",
"content": "Can you help me fetch the inventory records for components stored in a specific warehouse, along with their expiry dates?",
"sql": null
},
{
"role": "assistant",
"content": "HGETALL inv:<inventory_record_id>\nZRANGE component_expiry:<component_id> 0 -1 WITHSCORE... |
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 character varying(64) NOT NULL, first_nam... | [
{
"role": "user",
"content": "Summarize the total principal amount for loans, grouped by customer and their account type. Include the customer's full name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.first_name, T1.last_name, T2.account_type, SUM(T3.principal_amount) FROM f... |
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 NOT NULL DEFAULT gen_random_uuid(), -- un... | [
{
"role": "user",
"content": "Which games have at least one achievement worth exactly 75 points, and what are the names and descriptions of those achievements?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT g.title, a.name AS achievement_name, a.description\nFROM gaming_technolog... |
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, national_i... | [
{
"role": "user",
"content": "Which cities are listed as primary_address for citizens who have a verified account? Can you show the city names and the number of verified citizens in each city?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT SPLIT_PART(primary_address, ',', 1) AS 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 transportation.vehicles ( vehicle_id text PRIMARY KEY, license_plate text, vin text,... | [
{
"role": "user",
"content": "Provide a list of passengers including their passenger_id, first_name, last_name, phone_number, and the total number of bookings they have made. Sort the result by booking count in descending order.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.pa... |
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": "I want to know how many vehicles are assigned to each depot_id.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT depot_id, COUNT(*) AS vehicle_count FROM transportation.vehicles GROUP BY depot_id;",
"sql": null
},
{
"role": "user",
"con... |
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 PRIMARY KEY, user_id text, address text, p... | [
{
"role": "user",
"content": "Show a summary of each user, including their user_id, the count of orders they've placed, and the total traded value as buyers.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT o.user_id,\n COUNT(o.order_id) AS order_count,\n SUM(t.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.appointments (
appointment_id character varying(64) NOT NULL, -- uniq... | [
{
"role": "user",
"content": "For each scheduled appointment, list the appointment_id, appointment_time, patient_id, and the name of the patient's primary insurance plan. Only include appointments that have not been cancelled.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.appo... |
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.posts ( post_id character varying(64) NOT NULL, user_id character varyi... | [
{
"role": "user",
"content": "Show conversations that are group chats and have more than 5 participants. List the conversation_id and group_name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.conversation_id, c.group_name FROM social_media.conversations AS c JOIN social_media.... |
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, game_id.uuid, server_name.text, region.t... | [
{
"role": "user",
"content": "List each region and the number of servers currently in 'maintenance' status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT region,\n COUNT(*) AS maintenance_count\nFROM gaming_technology.servers\nWHERE status = 'maintenance'\nGROUP BY region;... |
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 PRIMARY KEY, national_id_number text,... | [
{
"role": "user",
"content": "What are all the unique job titles listed for employees?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT job_title FROM government_services.employees;",
"sql": null
},
{
"role": "user",
"content": "Could you show the count of ... |
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": "List all pairs of clients who registered on the same day, showing each client's first_name, last_name, and the registration date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c1.first_name AS first_name_1, c1.last_name AS last_name_1, c2.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 transportation.drivers ( driver_id.text, employee_id.text, first_name.text, last_nam... | [
{
"role": "user",
"content": "How many drivers and passengers have email addresses ending with 'company.com'? Return the count for each group.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT 'drivers' AS role, COUNT(*) AS count\nFROM transportation.drivers\nWHERE email LIKE '%@com... |
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 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 reservation_id_1,\n r2.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 government_services.notifications ( notification_id character varying(64) NOT NULL, ... | [
{
"role": "user",
"content": "For each citizen, how many notifications have a status of 'Read'? Please show the citizen_id and their corresponding count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT citizen_id, COUNT(*) AS read_notification_count\nFROM government_services.notif... |
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 PRIMARY KEY, game_id uuid, server_name te... | [
{
"role": "user",
"content": "Show me pairs of servers in the same region hosting different games where one has at least 100 more current players than the other.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s1.server_id AS server1_id,\n s1.server_name AS server1_name,\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 token_dexpool_info ( pair_address character varying(512) NOT NULL, token_name charac... | [
{
"role": "user",
"content": "List all tokens with a liquidity over $1 million and a negative 1-hour price change percentage on the Binance chain.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT token_name, token_symbol, price, price_change_percentage_1h, liquidity FROM token_dexp... |
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.diagnoses ( diagnosis_id.text, record_id.text, patient_id.text, doctor_id... | [
{
"role": "user",
"content": "For each diagnosis code_type, calculate the average number of refills_allowed for prescriptions linked to chronic diagnoses.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n d.code_type,\n AVG(p.refills_allowed) AS avg_refills_allowed\nFROM healthc... |
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": "Show the total number of contracts grouped by their status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT status, COUNT(*) AS contract_count FROM web3.contracts GROUP BY status;",
"sql": null
},
{
"role": "user",
"content": "Can you ... |
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.trades ( trade_id character varying(64) NOT NULL, account_id char... | [
{
"role": "user",
"content": "Show me the total quantity traded and total amount for each security, identified by its ticker symbol, for trades in the last month.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T2.ticker_symbol, SUM(T1.quantity), SUM(T1.total_amount) FROM financia... |
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_timestamp timestamp(3... | [
{
"role": "user",
"content": "List NFTs on 'Ethereum' with name, contract address, token ID, and rarity score.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT name, contract_address, token_id, rarity_score FROM nft_metadata WHERE 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 trading_platform.wallets ( wallet_id text, user_id text, address text, private_key t... | [
{
"role": "user",
"content": "Show me the order ID, order type, and asset name for all orders that resulted in at least one trade.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT o.order_id, o.order_type, a.name FROM trading_platform.orders o JOIN trading_platform.trades ... |
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.policy_beneficiaries ( beneficiary_id text PRIMARY KEY, policy_id text, cu... | [
{
"role": "user",
"content": "Show me all policy beneficiaries associated with customer ID 'CUST100'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT * FROM insurance.policy_beneficiaries WHERE customer_id = 'CUST100';",
"sql": null
},
{
"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 government_services.citizens ( citizen_id text PRIMARY KEY, national_id_number text,... | [
{
"role": "user",
"content": "What is the total amount of all payments recorded?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT SUM(amount) FROM government_services.payments;",
"sql": null
},
{
"role": "user",
"content": "Now only include payments with status 'Com... |
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": "List all job titles of employees who work in the 'Finance' department.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT job_title\nFROM government_services.employees\nWHERE department = 'Finance';",
"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 smart_money_profit ( address character varying(100) NOT NULL, rank INT, profit numer... | [
{
"role": "user",
"content": "List smart money addresses with an ROI between 10 and 50. Display the address, chain, profit, and roi.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT address, chain, profit, roi FROM smart_money_profit WHERE roi BETWEEN 10 AND 50",
"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.law_firms ( firm_id text, firm_name text, address text, phone text, w... | [
{
"role": "user",
"content": "Show all documents of type 'Evidence' uploaded in the last 30 days, including document_name, case_id, upload_timestamp, and version.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT document_name, case_id, upload_timestamp, version\nFROM legal_services... |
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.guests ( guest_id character varying(64) NOT NULL, first_name ... | [
{
"role": "user",
"content": "List all guests who have left a public review with an overall rating of 5. Include the guest's first name, last name, the review comment, and the review date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.first_name, T1.last_name, T2.comment, T2.... |
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 text, username text, email text, password_hash text, fu... | [
{
"role": "user",
"content": "List each user's username along with the number of posts they've made that include any media attachment, ordering the results by that count descending.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.username, COUNT(p.post_id) AS media_post_count\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 government_services.documents ( document_id character varying(64) NOT NULL, applicat... | [
{
"role": "user",
"content": "How many documents are in each verification status?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT verification_status, COUNT(*) FROM documents GROUP BY verification_status",
"sql": null
},
{
"role": "user",
"content": "For 'Verified'... |
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.claims ( claim_id text PRIMARY KEY, policy_id text, customer_id text, inci... | [
{
"role": "user",
"content": "What is the total estimated loss for all claims reported in the year 2024?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT SUM(estimated_loss) FROM insurance.claims WHERE EXTRACT(YEAR FROM reported_date) = 2024;",
"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 text, username text, email text, password_hash text, fu... | [
{
"role": "user",
"content": "I want to see each user's username and the number of posts they've made that include a media attachment of type 'image'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.username, COUNT(*) AS image_post_count\nFROM social_media.users u\nJOIN social_m... |
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.medications ( medication_id character varying(64) NOT NULL, medication_na... | [
{
"role": "user",
"content": "List all details for medications whose description contains the word 'pain'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT * FROM healthcare.medications WHERE description LIKE '%pain%';",
"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 insurance.customers ( customer_id character varying(64) NOT NULL, first_name charact... | [
{
"role": "user",
"content": "List the customer ID, first_name, last_name, city, and the number of active policies each customer has, but only include customers who live in 'CA' and have at least 2 active policies.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT cu.customer_id, cu... |
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": "Can you show me all routes where the origin_location_id is the same as the destination_location_id? List their route_id, route_number, and type.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT route_id, route_number, type\nFROM transportation.routes\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 social_media.messages (
message_id character varying(64) NOT NULL, -- unique ide... | [
{
"role": "user",
"content": "List the last 20 messages that have a media_url, showing message_id, sender_user_id, media_type, and sent_at, ordered by sent_at descending.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT message_id,\n sender_user_id,\n media_type,\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.services (
service_id character varying(64) NOT NULL, -- uni... | [
{
"role": "user",
"content": "Find the names of services and the locations where appointments have been scheduled for them.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.service_name, T2.location_name FROM services AS T1 JOIN appointments AS T3 ON T1.service_id = T3.service_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 hospitality_technology.payments ( payment_id text, reservation_id text, guest_id tex... | [
{
"role": "user",
"content": "Show the total payment amount grouped by currency_code and filtered to only include payments with status 'Pending' or 'Failed'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT currency_code, SUM(amount) AS total_amount FROM hospitality_technology.paym... |
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.text, project_id.text, project_name.text, rounds_nam... | [
{
"role": "user",
"content": "Show me the top 3 narratives by total USD value of token inflows where smart money was buying (type = 1).",
"sql": null
},
{
"role": "assistant",
"content": "SELECT narrative, SUM(usd_value) as total_usd_value\nFROM smart_money_token_inflow\nWHERE type = 1\nGROU... |
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, employee_id.text, first_name.text, last_nam... | [
{
"role": "user",
"content": "Please provide a list of all driver and passenger pairs who were hired and registered on the same date. Show the driver's full name, the passenger's full name, and the shared date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d.first_name AS driver... |
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": "Find all agents hired after '2021-01-01', including their first_name, last_name, hire_date, and their manager's full name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.agent_id,\n a.first_name,\n a.last_name,\n a.hire_date,\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 trading_platform.utxos ( utxo_id.text, transaction_id.text, output_index.integer, ad... | [
{
"role": "user",
"content": "Calculate the total value of unspent UTXOs for each user whose KYC status has been 'approved'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT kyc.user_id, SUM(u.amount) FROM trading_platform.kyc_audit kyc JOIN trading_platform.utxos u ON kyc.user_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 government_services.citizens ( citizen_id text, national_id_number text, first_name ... | [
{
"role": "user",
"content": "Give me a list of employees (first and last name) along with the count of appointments they have scheduled.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT e.first_name, e.last_name, COUNT(a.appointment_id) AS appointment_count\nFROM government_servic... |
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, first_name charac... | [
{
"role": "user",
"content": "Show me all clients whose company name contains 'Tech' and display their email and date of registration.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT first_name, last_name, company_name, email, date_registered FROM legal_services.clients WHERE comp... |
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 train_station_management.train_cars (
car_id character varying(64) NOT NULL, -- ... | [
{
"role": "user",
"content": "Can you help me retrieve the details of all bookings for a specific route with route_id 'RT789', including the passenger names and the scheduled departure times?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT b.booking_id, p.first_name, p.last_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 insurance.customers ( customer_id.text, first_name.text, last_name.text, date_of_bir... | [
{
"role": "user",
"content": "List the claim ID, customer full name, and claim status for all claims with a settlement amount less than 1000.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT cl.claim_id, c.first_name || ' ' || c.last_name AS customer_full_name, cl.status\nFROM insu... |
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.trades ( trade_id character varying(64) NOT NULL, account_id char... | [
{
"role": "user",
"content": "Find pairs of BUY and SELL trades from the trades table for the same account that occurred on the same settlement_date and had matching quantities.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n a.trade_id AS buy_trade_id,\n b.trade_id AS sell_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 healthcare.medical_records (
record_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "List the record_id, record_date, and treatment_plan for all medical records where the treatment_plan field is not null.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT record_id, record_date, treatment_plan\nFROM healthcare.medical_records\nWHERE trea... |
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.securities ( security_id text PRIMARY KEY, ticker_symbol text, is... | [
{
"role": "user",
"content": "List each branch_id, the number of employees in that branch, and the number of securities that trade on that branch's exchange.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT e.branch_id,\n COUNT(DISTINCT e.employee_id) AS employee_count,\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 insurance.customers ( customer_id text, first_name text, last_name text, date_of_bir... | [
{
"role": "user",
"content": "I need a list of customer pairs living in the same city, showing both customers' full names and the city.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c1.first_name || ' ' || c1.last_name AS customer1_name, c2.first_name || ' ' || c2.last_name AS 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 gaming_technology.player_inventory (
inventory_id uuid NOT NULL DEFAULT gen_rand... | [
{
"role": "user",
"content": "Show the latest time each player acquired any item.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT player_id, MAX(acquired_at) AS last_acquired_at FROM gaming_technology.player_inventory GROUP BY player_id;",
"sql": null
},
{
"role": "use... |
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, username.text, email.text, password_hash.text... | [
{
"role": "user",
"content": "Show me DApps that are linked to assets via metadata, listing the DApp name and the asset name. Assume the metadata key contains the word 'dapp'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.name AS dapp_name, T3.name AS asset_name FROM dapps 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 narrative_info ( narrative.text, top_3_coins.text, price_change_percentage_1h.numeri... | [
{
"role": "user",
"content": "Find narrative pairs where the sum of their price_change_percentage_1h is greater than 5. Show narrative1, change1, narrative2, change2, and the sum as total_change.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT n1.narrative AS narrative1, n1.price_... |
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": "Provide a count of contracts for each unique combination of network ID and status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT network_id, status, COUNT(*) FROM web3.contracts GROUP BY network_id, status;",
"sql": null
},
{
"role": "us... |
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.medical_records ( record_id text PRIMARY KEY, patient_id text, appointmen... | [
{
"role": "user",
"content": "List all medical records along with the chief complaint and record date for patients who had their medical record created after March 1, 2023 and whose record was created by doctor with ID 'doctor_123'.",
"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 legal_services.clients ( client_id text PRIMARY KEY, first_name text, last_name text... | [
{
"role": "user",
"content": "List the first and last names of all lawyers who have worked on time entries for cases associated with clients from the company 'Innovatech Ltd'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT T1.first_name, T1.last_name FROM legal_services.... |
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, -- fundrai... | [
{
"role": "user",
"content": "Show me the total USD value of tokens held by each centralized exchange on the 'Polygon' chain for the most recent snapshot time. List the exchange name and the total USD value.",
"sql": null
},
{
"role": "assistant",
"content": "WITH LatestSnapshot AS ( 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 healthcare.prescriptions ( prescription_id text PRIMARY KEY, record_id text, patient... | [
{
"role": "user",
"content": "List each doctor and how many prescriptions they have written, sorted by the highest count first.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT doctor_id, COUNT(*) AS prescription_count\nFROM healthcare.prescriptions\nGROUP BY doctor_id\nORDER BY pr... |
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.medications ( medication_id character varying(64) NOT NULL, medication_na... | [
{
"role": "user",
"content": "Show the medication_id, medication_name, and manufacturer for all medication entries.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT medication_id, medication_name, manufacturer FROM healthcare.medications;",
"sql": null
},
{
"role": "use... |
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 character varying(64) NOT NULL, client_... | [
{
"role": "user",
"content": "What is the count of appointments for each lawyer? Display the lawyer ID and the total count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT lawyer_id, COUNT(*) AS appointment_count FROM legal_services.appointments GROUP BY lawyer_id;",
"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.policies ( policy_id text, customer_id text, product_id text, agent_id tex... | [
{
"role": "user",
"content": "Show me all insurance products of type 'Travel', including their product_id, product_name, and base_premium.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT product_id, product_name, base_premium\nFROM insurance.insurance_products\nWHERE product_type ... |
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, first_name charact... | [
{
"role": "user",
"content": "What is the average commission rate for all active agents?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT AVG(commission_rate) FROM agents WHERE status = 'Active';",
"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.messages (
message_id character varying(64) NOT NULL, -- unique ide... | [
{
"role": "user",
"content": "List message IDs and their sent time for messages containing media attachments.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT message_id , sent_at FROM social_media.messages WHERE media_type 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 healthcare.patient_insurance (
patient_insurance_id character varying(64) NOT NU... | [
{
"role": "user",
"content": "Show me all patients who have non-primary insurance plans with expiration dates within the next 60 days, along with their policy numbers and subscriber names.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT patient_id, policy_number, subscriber_name F... |
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": "Show me the subjects and start times of all appointments along with the document names of any documents uploaded for the associated case.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.subject, a.start_time, d.document_name\nFROM legal_services.app... |
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 total revenue generated by ticket sales at the station with ID 'ST101' for the past month?",
"sql": null
},
{
"role": "assistant",
"content": "I'm sorry, but I can't provide information on the revenue generated by ticket sales as this data is not ava... |
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 text PRIMARY KEY, account_id text, ... | [
{
"role": "user",
"content": "Give me the total transaction amount and the total count of transactions per day for each currency.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT transaction_date::date AS txn_date, currency, SUM(amount) AS total_amount, COUNT(*) AS txn_count\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 erc20_balances ( block_number.bigint, contract_address.text, wallet_address.text, am... | [
{
"role": "user",
"content": "List each Avalanche token tick with its creator from token_info and the total transfer volume over the past 7 days.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT ta.tick,\n ti.creator,\n SUM(ta.amt) AS total_volume\nFROM token_activities... |
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": "Count the number of policies issued in each calendar year, and show the year and the count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT EXTRACT(YEAR FROM issued_at), COUNT(*) FROM insurance.policies WHERE issued_at IS NOT NULL GROUP BY 1 ORDER 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
Index 'component_inventory'. Mapping: { properties: { inventory_record_id: { type: 'keyword' }, c... | [
{
"role": "user",
"content": "在庫記録の中で、特定のバッチ番号に関連する情報を取得したいです。バッチ番号と在庫数量、倉庫の位置を表示してください。",
"sql": null
},
{
"role": "assistant",
"content": "SELECT batch_number, quantity, location_warehouse FROM component_inventory WHERE batch_number = 'specific_batch_number';",
"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": "List all insurance providers along with the total number of plans they offer.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT insurance_provider, COUNT(*) AS plan_count\nFROM healthcare.insurance_plans\nGROUP BY insurance_provider;",
"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 trading_platform.trades ( trade_id character varying(64) NOT NULL, order_id characte... | [
{
"role": "user",
"content": "Calculate the total quantity traded for each day in the dataset.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DATE_TRUNC('day', traded_at) AS trade_day, SUM(quantity) AS total_daily_quantity FROM trading_platform.trades GROUP BY DATE_TRUNC('day', 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 character varying(64) NOT NULL, -- unique iden... | [
{
"role": "user",
"content": "Show me all patients who have had at least one appointment with a doctor specializing in 'Cardiology'. Include the patient's full name, appointment time, and doctor's full name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.patient_id, p.first_nam... |
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": "Show me all documents uploaded in 2024 that do not have a description.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT document_id, file_name, uploaded_at\nFROM insurance.claim_documents\nWHERE uploaded_at >= '2024-01-01'\n AND uploaded_at < '2025-01... |
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": "I’d like to see a list of appointments along with any prescriptions made on the same day. Include appointment_id, prescription_id, medication_name, and appointment_time.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.appointment_id, p.prescription_... |
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.utxos (
utxo_id character varying(64) NOT NULL, -- unique iden... | [
{
"role": "user",
"content": "For each address, show the total amount contained in UTXOs that have been spent.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT address, SUM(amount) FROM utxos WHERE spent = TRUE GROUP BY address;",
"sql": null
},
{
"role": "user",
"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 financial_services.customers ( customer_id text, first_name text, last_name text, da... | [
{
"role": "user",
"content": "Can you show me, for each account type, the total transaction amount and the number of transactions, including the customer full name for each account type?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.account_type, c.first_name || ' ' || c.last_... |
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.policy_beneficiaries ( beneficiary_id.text, policy_id.text, customer_id.te... | [
{
"role": "user",
"content": "Show all beneficiaries assigned to policy ID 'POL67890', with their first and last names, relationship, and the date they were added.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT first_name, last_name, relationship, added_at\nFROM insurance.policy_... |
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, first_name.text, last_name.text, da... | [
{
"role": "user",
"content": "List all pairs of customers who have the same last name but live in different states. Show both customer ids, their full names, and their states.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.customer_id AS customer_id_a, a.first_name AS first_nam... |
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 each patient's first_name, last_name, and the time of their next scheduled appointment occurring after the current timestamp.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.first_name, p.last_name, MIN(a.appointment_time) AS next_appointment_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 trading_platform.users ( user_id text PRIMARY KEY, username text, email text, passwo... | [
{
"role": "user",
"content": "Show all trades that occurred after '2024-06-01', including the trade ID, quantity, price, and the name and symbol of the asset traded.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT t.trade_id, t.quantity, t.price, a.name AS asset_name, a.symbol 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 trading_platform.users ( user_id text PRIMARY KEY, username text, email text, passwo... | [
{
"role": "user",
"content": "What is the total sum of all amounts for all UTXOs in the system, regardless of whether they are spent or unspent?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT SUM(amount) FROM trading_platform.utxos",
"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.applications ( application_id character varying(64) NOT NULL, ci... | [
{
"role": "user",
"content": "Find the full names of employees who have verified documents that have an expiry date in the past and are marked as 'Verified'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT T1.first_name, T1.last_name FROM government_services.employees 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 legal_services.invoices ( invoice_id character varying(64) NOT NULL, invoice_number ... | [
{
"role": "user",
"content": "List all pairs of invoices for the same client where one invoice is overdue and the other is paid. Show the client_id, the overdue invoice number, and the paid invoice number.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT i1.client_id, i1.invoice_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 transportation.drivers ( driver_id.text, employee_id.text, first_name.text, last_nam... | [
{
"role": "user",
"content": "List the first and last names of all drivers who share a last name with any passenger, along with the passenger's first name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d.first_name AS driver_first_name, d.last_name, p.first_name AS passenger_fir... |
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 character varying(64) NOT NULL, -- uniq... | [
{
"role": "user",
"content": "List all appointments with a non-empty notes field. Return appointment_id, appointment_time, and doctor_id.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT appointment_id, appointment_time, doctor_id\nFROM healthcare.appointments\nWHERE notes IS NOT N... |
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 reason behind the cost variation for maintenance of asset_id 'ASSET456' over the past year?",
"sql": null
},
{
"role": "assistant",
"content": "I'm sorry, but I can't provide information on the reasons behind cost variations for maintenance. The data... |
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.orders ( order_id text PRIMARY KEY, user_id text, wallet_id text, a... | [
{
"role": "user",
"content": "Provide a list of order_id and notification_id for all orders and notifications that occurred on the same day for each user.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT o.order_id,\n n.notification_id\nFROM trading_platform.orders o\nJOIN 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 project_fundraising_record ( id character varying(32) NOT NULL, project_id character... | [
{
"role": "user",
"content": "For each narrative in token_basic_info, compute the total liquidity and count of tokens from token_dexpool_info. Show narrative, total_liquidity, and token_count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT tbi.narrative,\n SUM(td.liquidity) AS 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 government_services.citizens ( citizen_id text, national_id_number text, first_name ... | [
{
"role": "user",
"content": "Which citizens have scheduled appointments at locations located in 'New York'? Show their first and last name as well as the location name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT c.first_name, c.last_name, sl.location_name\nFROM gove... |
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.room_types ( room_type_id text, property_id text, type_name t... | [
{
"role": "user",
"content": "List all public reviews with a rating_overall of at least 4, including review_id, guest_id, property_id, reservation_id, and review_date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT review_id, guest_id, property_id, reservation_id, review_date\nFR... |
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 text PRIMARY KEY, agency_id text, service_... | [
{
"role": "user",
"content": "List the accessible service locations and active services offered by the same agency where the service's average processing time is under 5 days. Include the location name, city, state, service name, and processing time.",
"sql": null
},
{
"role": "assistant",
"... |
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 character varying(64) NOT NULL, -- uniq... | [
{
"role": "user",
"content": "For each customer, provide a summary of their account statuses, showing their full name, account status, and the count of accounts for each status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.first_name, c.last_name, a.status, COUNT(a.account_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 social_media.users ( user_id text PRIMARY KEY, username text, email text, password_h... | [
{
"role": "user",
"content": "Show the names of group conversations and how many participants they have.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.group_name, count(cp.user_id) AS participant_count FROM social_media.conversations AS c JOIN social_media.conversation_partici... |
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 PRIMARY KEY, property_name text... | [
{
"role": "user",
"content": "List all service orders showing the order ID, service ID, quantity, and total price.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT order_id, service_id, quantity, total_price FROM hospitality_technology.service_orders LIMIT 100;",
"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 insurance.policies ( policy_id character varying(64) NOT NULL, customer_id character... | [
{
"role": "user",
"content": "List all insurance products along with their product type and creation date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT product_name, product_type, created_at\nFROM insurance.insurance_products;",
"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 financial_services.transactions ( transaction_id.text, account_id.text, related_acco... | [
{
"role": "user",
"content": "Show me the number of market data points and average adjusted close price per source.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT source, COUNT(*) AS data_point_count, AVG(adjusted_close_price) AS avg_adjusted_close_price\nFROM financial_services.... |
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 trips where the actual arrival was earlier than the scheduled arrival, including the trip ID, scheduled and actual arrival times, and the vehicle make and model used.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.trip_id, T1.scheduled_arriva... |
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": "Which citizens have a contact email ending with '@yahoo.com' and have received at least one notification? Show their first name, last name, and email.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT c.first_name, c.last_name, c.contact_email\... |
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.text, rank.numeric, profit.numeric, roi.numeric, realiz... | [
{
"role": "user",
"content": "Which token had the highest ROI for smart money addresses on the BSC chain? Please show the token symbol and the highest ROI as well as the address.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT most_profit_token, MAX(roi) AS highest_roi, address\nF... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.