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 gaming_technology.servers ( server_id uuid NOT NULL DEFAULT gen_random_uuid(), game_... | [
{
"role": "user",
"content": "For each server, show it alongside another server in the same region that has the closest number of current players.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n s1.server_id AS server_a_id,\n s1.server_name AS server_a_name,\n s2.server_id 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 transportation.locations ( location_id text PRIMARY KEY, name text, type text, addre... | [
{
"role": "user",
"content": "Show all cities in the USA that have more than one distinct location type represented. List the city, country, and number of distinct location types.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT city, country, COUNT(DISTINCT type) AS distinct_locat... |
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": "List all policies that have a coverage_limit exactly equal to the deductible. Show policy_id, policy_number, coverage_limit, and deductible.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT policy_id, policy_number, coverage_limit, deductible\nFROM ins... |
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 me a list of all patient names along with the full names of their doctors for appointments scheduled in February 2024.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.first_name AS patient_first_name, p.last_name AS patient_last_name, d.first_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 project_fundraising_record ( id text, project_id text, project_name text, rounds_nam... | [
{
"role": "user",
"content": "Which chain has the highest average ROI among all tokens in smart_money_token_performance? Show the chain and the average ROI.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT chain, AVG(roi) AS avg_roi\nFROM smart_money_token_performance\nGROUP BY cha... |
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": "For each relationship type among policy beneficiaries, show the average percentage_share and the count of unique beneficiaries. Please order the results with the highest average percentage_share first.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT 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 transportation.vehicles (
vehicle_id character varying(64) NOT NULL, -- unique ... | [
{
"role": "user",
"content": "Show me a list of all vehicles along with their make, model, year, and the name of their home depot.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT v.vehicle_id, v.make, v.model, v.year, v.depot_id\nFROM transportation.vehicles v;",
"sql": null
... |
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 maintenance schedule for the train car with car_id 'CAR456'?",
"sql": null
},
{
"role": "assistant",
"content": "I'm sorry, but I can't provide information about the maintenance schedule for train cars as it is not included in the data available in 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.medications ( medication_id text PRIMARY KEY, medication_name text, gener... | [
{
"role": "user",
"content": "Find all medications whose NDC code starts with '0003'. Show the medication ID and NDC code.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT medication_id, ndc_code FROM healthcare.medications WHERE ndc_code LIKE '0003%';",
"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.developers ( developer_id uuid, name text, country text, founded_y... | [
{
"role": "user",
"content": "List all items of type 'Armor' in the database, showing the item name, rarity, and their corresponding game_id.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT item_id, item_name, rarity, game_id\nFROM gaming_technology.in_game_items\nWHERE item_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 gaming_technology.achievements ( achievement_id.uuid, game_id.uuid, name.text, descr... | [
{
"role": "user",
"content": "Could you list each game_id along with the count of hidden achievements and the count of visible achievements?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT game_id,\n SUM(CASE WHEN hidden THEN 1 ELSE 0 END) AS hidden_count,\n SUM(CASE W... |
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 insurance.policies ( policy_id text, customer_id text, product_id text, agent_id tex... | [
{
"role": "user",
"content": "How many beneficiaries exist for each relationship type in the policy_beneficiaries table? Return relationship and beneficiary_count, ordered by count descending.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT relationship, COUNT(*) AS beneficiary_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 trading_platform.users ( user_id character varying(64) NOT NULL, username character ... | [
{
"role": "user",
"content": "How many DApps have names that start with the letter 'A'?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(*) AS dapp_count\nFROM trading_platform.dapps\nWHERE name LIKE 'A%';",
"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.text, national_id_number.text, first_name.... | [
{
"role": "user",
"content": "List the service names, agency names, and standard fees for all services that are active and have a standard fee between 50 and 100 inclusive.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s.service_name, ag.agency_name, s.standard_fee\nFROM governm... |
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": "For each contract that has received transactions, list its address and the total value of Ether received.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.address, SUM(T2.value) FROM web3.contracts AS T1 JOIN web3.transactions AS T2 ON T1.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 hospitality_technology.rooms ( room_id character varying(64) NOT NULL, property_id c... | [
{
"role": "user",
"content": "Retrieve the total revenue generated by each service.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT so.service_id, SUM(so.total_price) AS total_revenue\nFROM hospitality_technology.service_orders so\nGROUP BY so.service_id;",
"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, national_i... | [
{
"role": "user",
"content": "For each agency offering more than 5 active services, list the agency_name, jurisdiction_level, and the count of active services. Order the results by the count in descending order.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.agency_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 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 insurance.claims ( claim_id character varying(64) NOT NULL, policy_id character vary... | [
{
"role": "user",
"content": "For each claim, count the number of documents linked to it. Show claim_id and document_count for claims that have more than 3 documents.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT claim_id, COUNT(*) AS document_count\nFROM insurance.claim_documen... |
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 premium payments that were made using 'credit card' as the payment method.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT payment_id, policy_id, customer_id, payment_date, amount_paid, payment_method\nFROM insurance.premium_payments\nWHERE 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 transportation.vehicles (
vehicle_id character varying(64) NOT NULL, -- unique ... | [
{
"role": "user",
"content": "Provide a summary showing, for each vehicle type, the total number of fueling events and the combined total fuel quantity refueled.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT v.type AS vehicle_type, COUNT(f.fuel_log_id) AS total_fueling_events, 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 web3.contracts ( contract_id character varying(64) NOT NULL, address character varyi... | [
{
"role": "user",
"content": "Show me all contracts deployed on the 'ethereum' network along with their deployer addresses and the count of transactions they've been involved in, sorted by transaction count in descending order.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.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 legal_services.clients (
client_id character varying(64) NOT NULL, -- unique id... | [
{
"role": "user",
"content": "List the full names and email addresses of all lawyers who have handled at least one appointment for a client from the company 'Innovatech Ltd', along with the company name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT l.first_name, l.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 gaming_technology.developers ( developer_id uuid, name text, country text, founded_y... | [
{
"role": "user",
"content": "List all developer names and their countries.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT name, country FROM gaming_technology.developers;",
"sql": null
},
{
"role": "user",
"content": "Filter the list to only include developers fr... |
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": "Retrieve the citizen_id, full name, and registration_date of all citizens born before 1980-01-01 who are not verified.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT citizen_id,\n first_name || ' ' || last_name AS full_name,\n registratio... |
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
// PUT /stations
{
"mappings": {
"properties": {
"station_id": { "type": "keyword" },... | [
{
"role": "user",
"content": "Can you provide the total capacity of all train cars for a specific train with train_id 'TR789'?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT SUM(capacity) AS total_capacity\nFROM train_cars\nWHERE train_id = 'TR789';",
"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, national_i... | [
{
"role": "user",
"content": "For each citizen who has made at least one payment, list their full name and the total amount they've paid in each currency.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.first_name, T1.last_name, T2.currency, SUM(T2.amount) FROM government_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 blockchain.wallets ( wallet_id text, user_id text, address_id text, private_key text... | [
{
"role": "user",
"content": "Show me the top 5 users with the most wallet addresses, along with the count of their wallets.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT user_id, COUNT(wallet_id) AS wallet_count FROM blockchain.wallets WHERE user_id IS NOT NULL GROUP BY 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 trading_platform.users ( user_id text PRIMARY KEY, username text, email text, passwo... | [
{
"role": "user",
"content": "For each user, show their user_id, username, and the total number of trades they have participated in, counting both as buyer and as seller.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n u.user_id,\n u.username,\n COALESCE(b.buy_count, 0) + COA... |
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": "What is the total amount invoiced per status?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT status,\n SUM(total_amount) AS total_invoiced\nFROM legal_services.invoices\nGROUP BY status;",
"sql": null
},
{
"role": "user",
"conte... |
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 property, show the total number of reservations with status 'Confirmed' and the average total_amount.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.property_id,\n p.property_name,\n COUNT(r.reservation_id) AS confirmed_reserva... |
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": "Show me all claim documents that are PDFs and were uploaded in the last 30 days, along with their claim IDs and file sizes.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT cd.document_id, cd.claim_id, cd.file_size_bytes, c.policy_id FROM insurance.cla... |
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.rooms ( room_id.text, property_id.text, room_number.text, roo... | [
{
"role": "user",
"content": "Calculate the total payment amount grouped by payment_method.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT payment_method, SUM(amount) AS total_amount\nFROM hospitality_technology.payments\nGROUP BY payment_method;",
"sql": null
},
{
"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.agencies ( agency_id.text, agency_name.text, jurisdiction_level.... | [
{
"role": "user",
"content": "Show the number of inactive services offered by agencies in each jurisdiction level.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.jurisdiction_level, COUNT(s.service_id) FROM government_services.agencies a JOIN government_services.services s ON 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 insurance.customers ( customer_id character varying(64) NOT NULL, first_name charact... | [
{
"role": "user",
"content": "I want to see each active agent and the total premium_amount of the policies they sold in 2024.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.agent_id, a.first_name, a.last_name, SUM(p.premium_amount) AS total_premium\nFROM insurance.agents a\nJOI... |
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": "For each user, show their username and the total number of completed orders they have placed, along with the name of the asset for each order.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.username, a.name AS asset_name, COUNT(o.order_id) AS compl... |
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.assets ( asset_id character varying(64) NOT NULL, name character va... | [
{
"role": "user",
"content": "List all addresses from the utxos table that have at least one spent UTXO and at least one unspent UTXO.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT address FROM trading_platform.utxos GROUP BY address HAVING MIN(spent::int) = 0 AND MAX(spent::int... |
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": "List the city and the count of accessible and inaccessible service locations separately. Return city, accessible_count, and inaccessible_count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT city,\n SUM(CASE WHEN is_accessible THEN 1 ELSE 0 END... |
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.employees (
employee_id character varying(64) NOT NULL, -- u... | [
{
"role": "user",
"content": "Which department has the highest number of employees currently employed?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT department FROM government_services.employees WHERE termination_date IS NULL GROUP BY department ORDER BY COUNT(*) DESC LIMIT 1;",... |
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.appointments ( appointment_id text PRIMARY KEY, citizen_id text,... | [
{
"role": "user",
"content": "List the names of service locations that have had more than 10 appointments with a status of 'Cancelled'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T2.location_name FROM government_services.appointments AS T1 JOIN government_services.service_loc... |
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": "Find all tokens on the 'BSC' chain in the latest snapshot where the individual holding `usd_value` is greater than $1,000,000. Show their symbol, exchange, balance, and USD value.",
"sql": null
},
{
"role": "assistant",
"content": "WITH latest_snapshot AS (\n 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 insurance.policies ( policy_id character varying(64) NOT NULL, customer_id character... | [
{
"role": "user",
"content": "Find all pairs of policies for the same customer where their coverage periods overlap. Show customer_id, policy1_id, policy2_id, overlap_start, and overlap_end.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p1.customer_id,\n p1.policy_id AS po... |
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 all documents along with the document type and the case name they are associated with.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d.document_name, d.document_type, c.case_name\nFROM legal_services.documents d\nJOIN legal_services.cases c ON ... |
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 PRIMARY KEY, record_id text, patient_id tex... | [
{
"role": "user",
"content": "Find all diagnoses linked to prescriptions that have a quantity dispensed greater than 50. Show the diagnosis description and the diagnosis date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.description, T1.diagnosis_date FROM healthcare.diagnos... |
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.text, first_name.text, last_name.text, emai... | [
{
"role": "user",
"content": "Find guests born before 1990 who have 'Pet Friendly' in their preferences. List their full name (first and last) and date of birth.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT first_name, last_name, date_of_birth FROM hospitality_technology.guests... |
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": "I want to compare servers within the same region. List pairs of servers where one has fewer current_players than the other. Include each server's name, region, and their current_players counts.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s1.server... |
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": "List all unique peer ports that have been used at least once in the system.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT port FROM trading_platform.peers ORDER BY port ASC;",
"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 token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash varch... | [
{
"role": "user",
"content": "Show me the current amount held and wallet address for all wallets holding more than 100,000 units of the ERC20 token with contract address '0xeeee...'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT wallet_address, amount FROM erc20_balances WHERE 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.market_data ( data_point_id bigserial NOT NULL, security_id chara... | [
{
"role": "user",
"content": "How many market data points are there per day?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT date(md.data_timestamp) AS day, COUNT(*) AS data_point_count\nFROM financial_services.market_data md\nGROUP BY date(md.data_timestamp)\nORDER BY day;",
... |
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 text PRIMARY KEY, claim_id text, document_ty... | [
{
"role": "user",
"content": "List all documents uploaded in the year 2024, showing document_id, file_name, and uploaded_at.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT document_id, file_name, uploaded_at FROM insurance.claim_documents WHERE uploaded_at >= '2024-01-01' AND upl... |
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 all posts along with the number of comments each post has received.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.post_id, COUNT(c.comment_id) AS comment_count\nFROM social_media.posts p\nLEFT JOIN social_media.comments c ON p.post_id = c.pos... |
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, patient_id ... | [
{
"role": "user",
"content": "Retrieve all appointments for doctor 'doc123' scheduled in April 2024, showing appointment ID, patient ID, time, and status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT appointment_id, patient_id, appointment_time, status FROM healthcare.appointme... |
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 PRIMARY KEY, firm_name text, address text, p... | [
{
"role": "user",
"content": "Find law firms that share the same managing partner. Show the names of both firms and the managing_partner_id.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.firm_name AS firm1, b.firm_name AS firm2, a.managing_partner_id\nFROM legal_services.law_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.players ( player_id uuid PRIMARY KEY, username text, email text, p... | [
{
"role": "user",
"content": "Show me the top 5 games by number of online servers in European regions. I want the game title and the server count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT g.title, COUNT(s.server_id) AS server_count\nFROM gaming_technology.games g\nJOIN gami... |
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.game_sessions ( session_id uuid NOT NULL DEFAULT gen_random_uuid()... | [
{
"role": "user",
"content": "I want to list all sessions for player with ID '123e4567-e89b-12d3-a456-426614174000' and display their session start time, end time, and score, along with the game_id and server_id.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT session_id, game_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.service_locations ( location_id text, agency_id text, location_n... | [
{
"role": "user",
"content": "For each city and state, show the number of service locations available along with their accessibility status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT city, state, is_accessible, COUNT(*) AS location_count FROM government_services.service_loca... |
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 symbol, name, and total supply for all ERC20 tokens.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT symbol, name, total_supply FROM token_metas WHERE is_erc20 = 1;",
"sql": null
},
{
"role": "user",
"content": "Include the de... |
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.rooms ( room_id text, property_id text, room_number text, roo... | [
{
"role": "user",
"content": "Which rooms have not been cleaned in over 14 days? Show the room number, property ID, last cleaned date, and status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT room_number, property_id, last_cleaned_at, status\nFROM hospitality_technology.rooms\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, -- the id of dexp... | [
{
"role": "user",
"content": "Which two tokens on each chain have the greatest difference in their 24h price change percentage? Show token_symbol A, token_symbol B, chain, and the absolute difference.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT ON (t1.chain)\n t1.tok... |
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 character varying(64) NOT NULL, -- un... | [
{
"role": "user",
"content": "Can you show a list of all distinct medication IDs along with the count of prescriptions for each medication, including only medications that have been prescribed more than 50 times? Also, please display the total quantity dispensed for each medication.",
"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": "Calculate the average premium_amount of all policies, grouped by their status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT status,\n AVG(premium_amount) AS average_premium\nFROM insurance.policies\nGROUP BY status;",
"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 hospitality_technology.properties (
property_id character varying(64) NOT NULL, ... | [
{
"role": "user",
"content": "List the full names of guests who have made reservations at properties with a star rating of 5. Include the guest ID and the property name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.first_name, T1.last_name, T1.guest_id, T3.property_name 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.citizens ( citizen_id text PRIMARY KEY, national_id_number text,... | [
{
"role": "user",
"content": "Find the citizen_id, full name, contact_email, and the number of notifications each citizen has received in the last 7 days. Only include citizens who have received at least 3 notifications.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.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 social_media.likes (
like_id character varying(64) NOT NULL, -- unique identifie... | [
{
"role": "user",
"content": "Count the total number of likes on posts versus likes on comments across the entire platform.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT CASE WHEN post_id IS NOT NULL THEN 'post' ELSE 'comment' END AS like_target, COUNT(*) AS total_likes FROM soc... |
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.documents ( document_id text, case_id text, document_name text, docum... | [
{
"role": "user",
"content": "Show all pairs of 'Evidence' documents within the same case, listing their document names, version numbers, and the shared case_id.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d1.case_id,\n d1.document_name AS doc1_name,\n d1.version ... |
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 text, user_id text, content text, media_url text, media... | [
{
"role": "user",
"content": "What are the top 5 posts by number of likes, showing post_id, media_type and like_count, ordered by like_count descending?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.post_id, p.media_type, COUNT(l.like_id) AS like_count\nFROM social_media.posts... |
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 manufacturing date of the train car with car_id 'CAR789'?",
"sql": null
},
{
"role": "assistant",
"content": "I'm sorry, but I don't have access to information about the manufacturing date of train cars. The data available in the train_cars table onl... |
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": "Count the number of trips for each route type.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT R.type, COUNT(T.trip_id) FROM transportation.trips AS T JOIN transportation.routes AS R ON T.route_id = R.route_id GROUP BY R.type;",
"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.users ( user_id character varying(64) NOT NULL, username character ... | [
{
"role": "user",
"content": "Show each user's username along with their total traded value as buyers and their total traded value as sellers for trades executed in June 2024.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.username,\n COALESCE(buy_tot.buy_value, 0) AS buy... |
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.platforms (
platform_id character varying(64) NOT NULL,... | [
{
"role": "user",
"content": "Can you help me retrieve the details of all platforms at a specific station with station_id 'STATION_001', including the platform status and whether they are accessible?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT platform_id, platform_number, tra... |
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": "Retrieve all prescriptions for patient 'patient_007', showing prescription_id, medication_id, start_date, and end_date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT prescription_id, medication_id, start_date, end_date\nFROM healthcare.prescriptions... |
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.text, claim_id.text, document_type.text, fil... | [
{
"role": "user",
"content": "Show me all details for documents associated with claim ID 'CLM98765'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT * FROM insurance.claim_documents WHERE claim_id = 'CLM98765';",
"sql": null
},
{
"role": "user",
"content": "From th... |
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 text, order_id text, buyer_id text, seller_id tex... | [
{
"role": "user",
"content": "Show each user's total count of notifications and, for each, how many of them have been read.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT user_id, COUNT(*) AS total_notifications, COUNT(read_at) AS notifications_read \nFROM trading_platform.notifi... |
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 PRIMARY KEY, property_id t... | [
{
"role": "user",
"content": "Give me the total number of reservations and the sum of total_amount by month for the year 2023.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DATE_TRUNC('month', check_in_date) AS month,\n COUNT(*) AS reservation_count... |
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": "List tokens on the 'Polygon' chain held by CEX addresses. Show token_symbol and total USD value held.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT token_symbol, SUM(usd_value) AS total_usd_value\nFROM cex_token_balance\nWHERE chain = 'Polygon'\nGRO... |
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.developers ( developer_id uuid, name text, country text, founded_y... | [
{
"role": "user",
"content": "I want to find pairs of developers that share the same website domain. For each pair, show both developer names and the domain.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d1.name AS developer1, d2.name AS developer2, d1.domain AS domain\nFROM (\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": "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 social_media.conversations ( conversation_id.text, created_at.timestamp, last_messag... | [
{
"role": "user",
"content": "I want to see for each group chat the count of unread 'mention' notifications received by its recipients. Include conversation_id, group_name, and unread_mentions.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.conversation_id,\n c.group_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 project_fundraising_record ( id text, project_id text, project_name text, rounds_nam... | [
{
"role": "user",
"content": "For each narrative in token_basic_info, calculate the total net_flow and average ROI from smart_money_token_performance. List narrative, total_net_flow, avg_roi, ordered by total_net_flow descending.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT tbi... |
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.post_hashtags ( post_hashtag_id text, post_id text, hashtag_id text )
C... | [
{
"role": "user",
"content": "Show me the user_id and number of conversations they have joined. Only include users who joined more than one conversation.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT user_id, COUNT(DISTINCT conversation_id) AS conversations_joined\nFROM 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 social_media.conversations ( conversation_id character varying(64) NOT NULL, created... | [
{
"role": "user",
"content": "For each group chat, list its ID, name, creation time, and the creation time of the next group chat created after it, ordered by creation time.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT conversation_id, group_name, created_at, LEAD(created_at) 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 web3.transactions ( transaction_id text, from_address text, to_address text, value n... | [
{
"role": "user",
"content": "For each transaction, find the next transaction by the same sender. Show the original transaction_id as current_tx, the next transaction_id as next_tx, from_address, and the time difference in minutes between them.",
"sql": null
},
{
"role": "assistant",
"conten... |
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": "Show the full name and email of each driver and the number of vehicles currently assigned to their depot.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d.first_name, d.last_name, d.email, COUNT(v.vehicle_id) AS vehicles_at_depot\nFROM transportation... |
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": "How many fundraising rounds did each project complete?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT project_name, COUNT(*) AS round_count FROM project_fundraising_record GROUP BY project_name;",
"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 project_fundraising_record ( id.text, project_id.text, project_name.text, rounds_nam... | [
{
"role": "user",
"content": "Which project had the largest single fundraising in each investment round, along with the round's name and introduction?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT t1.project_name, t1.rounds_name, t1.investment_value, t1.introduction FROM project... |
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 smart_money_token_inflow ( token_address.text, token_symbol.text, token_amount.numer... | [
{
"role": "user",
"content": "For each chain, find the token with the highest net USD inflow (buys minus sells). Show token_symbol, chain, and net_inflow.",
"sql": null
},
{
"role": "assistant",
"content": "WITH inflow AS (\n SELECT token_symbol, chain, SUM(usd_value) AS usd_in\n FROM smar... |
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 all policies that were cancelled in 2024, including their policy_number, cancellation_date, and cancellation_reason. Also show the file name of any associated claim documents.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.policy_number, p.can... |
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": "Show me the driver first_name, last_name, and the name of the destination location for all trips scheduled to depart between '2024-05-01' and '2024-05-31'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d.first_name, d.last_name, l.name AS destinatio... |
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 each customer along with another customer living at the same address.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.customer_id AS customer_id_a, a.first_name || ' ' || a.last_name AS full_name_a, b.customer_id AS customer_id_b, b.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 hospitality_technology.rooms ( room_id.text, property_id.text, room_number.text, roo... | [
{
"role": "user",
"content": "I need the full names of guests who have checked out in June 2023. Show reservation_id, guest first and last name, property_id and actual_check_out_ts.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT r.reservation_id, g.first_name || ' ' || g.last_nam... |
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 training programs or certifications completed by a staff member with the role of Platform Supervisor?",
"sql": null
},
{
"role": "assistant",
"content": "I'm sorry, but I don't have access to information about the training programs or certifications... |
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": "List the notification ID, message subject, and sent time for all notifications sent through the 'SMS' channel.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT notification_id, message_subject, sent_at FROM government_services.notifications WHERE chann... |
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": "Provide a list of all vehicles along with the total maintenance cost they have incurred, and show the make and model of each vehicle.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT v.vehicle_id, v.make, v.model, SUM(m.cost) AS total_maintenance_cost\... |
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 character varying(512) NOT NULL, -- the id of na... | [
{
"role": "user",
"content": "Show me the top 3 narratives by 24-hour trading volume, along with their 1-hour and 24-hour price change percentages.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT narrative, volume_24h, price_change_percentage_1h, price_change_percentage_24h FROM 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 legal_services.invoices ( invoice_id text, invoice_number text, client_id text, case... | [
{
"role": "user",
"content": "List all invoices with status 'Paid' where the payment date is later than the due date, showing the invoice number, issue date, due date, payment date, total amount, and amount paid.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT invoice_number, issu... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.clients ( client_id text, first_name text, last_name text, company_na... | [
{
"role": "user",
"content": "Show all cases that are currently open and have a client whose status is prospect. Include the case_number, the case_name, and the client's full name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT cs.case_number, cs.case_name, cl.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 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
Index 'aircraft_models'. Mapping: { properties: { model_id: { type: 'keyword' }, model_name: { ty... | [
{
"role": "user",
"content": "Can you help me fetch all inspection records for components associated with a specific aircraft build, along with the component names and inspection results?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT i.inspection_id, i.build_id, i.component_id, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.