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 healthcare.medical_records (
record_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "Show me the insurance provider, plan name, and count of insurance plans that have a '.org' website. Group by insurance provider and plan name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT insurance_provider, plan_name, COUNT(*) AS plan_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 erc1155_approval_for_all ( block_number bigint, block_timestamp timestamp, transacti... | [
{
"role": "user",
"content": "Show me all wallet addresses that hold more than 3 different NFTs from any ERC1155 contract. For each wallet, list the contract address and the count of distinct token_ids.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT contract_address, wallet_addre... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE trading_platform.users ( user_id character varying(64) NOT NULL, username character ... | [
{
"role": "user",
"content": "List all DApps along with their URLs.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT name, url FROM trading_platform.dapps;",
"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.securities ( security_id text PRIMARY KEY, ticker_symbol text, is... | [
{
"role": "user",
"content": "What is the count of securities for each security_type in the 'Technology' sector?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT security_type, COUNT(*) as count FROM financial_services.securities WHERE sector = 'Technology' GROUP BY security_type;"... |
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREA... | [
{
"role": "user",
"content": "What is the current salary of employee with ID 'EMP123'?",
"sql": null
},
{
"role": "assistant",
"content": "I'm sorry, but I can't provide information about an employee's salary as it is not included in the data available in the 'employees' table.",
"sql": ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birt... | [
{
"role": "user",
"content": "Show me all patients who have a primary insurance plan from 'Blue Cross', along with their insurance policy numbers and the plan types.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.patient_id, p.first_name, p.last_name, pi.policy_number, ip.plan_... |
You are an expert in writing database language. You can write a corresponding 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
CREATE TABLE insurance.claim_documents (
document_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "For each document type, how many documents were uploaded by each user? Show the uploaded_by, document_type, and document count, ordered by document_type and count descending.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT uploaded_by, document_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 legal_services.law_firms ( firm_id text, firm_name text, address text, phone text, w... | [
{
"role": "user",
"content": "Retrieve the invoice_number, issue_date, total_amount, client_id, and case_name for all invoices with status 'Sent' issued between '2024-07-01' and '2024-07-31'. Order the results by issue_date descending.",
"sql": null
},
{
"role": "assistant",
"content": "SELE... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
Node Label ':AircraftModel'. Properties: { model_id: String (Constraint: UNIQUE), model_name: Str... | [
{
"role": "user",
"content": "Can you help me fetch the inventory details for components associated with a specific aircraft build, including the batch number, quantity, and warehouse location?",
"sql": null
},
{
"role": "assistant",
"content": "MATCH (ab:AircraftBuild {build_id: 'specific_b... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.claims ( claim_id.text, policy_id.text, customer_id.text, incident_date.ti... | [
{
"role": "user",
"content": "Retrieve customer_id for customers who have a denied claim and an approved claim on the same incident_date. Show customer_id, denied_claim_id, approved_claim_id, and incident_date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c_denied.customer_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 financial_services.customers ( customer_id.text, first_name.text, last_name.text, da... | [
{
"role": "user",
"content": "Show the total sum and average amount for all OUTGOING transactions within the last 30 days, grouped by transaction_type.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT transaction_type, SUM(amount) AS total_amount, AVG(amount) AS avg_amount FROM fin... |
You are an expert in writing database language. You can write a corresponding 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.text,... | [
{
"role": "user",
"content": "I need to know how many distinct wallets hold each ERC20 token. Please show the token contract_address, symbol, and holder_count, sorted by holder_count descending.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT eb.contract_address, tm.symbol, 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 transportation.drivers ( driver_id text PRIMARY KEY, employee_id text, first_name te... | [
{
"role": "user",
"content": "List the first name, last name, and the total count of maintenance logs associated with the vehicles driven by each driver.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.first_name, T1.last_name, count(T4.log_id) FROM transportation.drivers AS T1... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.clients ( client_id text PRIMARY KEY, first_name text, last_name text... | [
{
"role": "user",
"content": "Show me all documents uploaded by lawyers from law firms located in 'New York'. Include the document name, upload timestamp, the first and last name of the uploading lawyer, and the firm name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d.document... |
You are an expert in writing database language. You can write a corresponding 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 all tokens on the 'Ethereum' chain with DEX 24h volume over 1000000. Show token_symbol, price, and volume_24h.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT token_symbol, price, volume_24h\nFROM token_dexpool_info\nWHERE chain = 'Ethereum' AND ... |
You are an expert in writing database language. You can write a corresponding 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": "Find pairs of claim documents for the same claim where the upload time difference is less than 5 minutes. List the document IDs of the pairs and the claim ID.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.document_id AS document1_id, b.document_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 healthcare.doctors ( doctor_id.text, first_name.text, last_name.text, specialty.text... | [
{
"role": "user",
"content": "Can you show me all doctors affiliated with hospital ID 'HOSP1001', including their doctor ID, full name, and specialty?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT doctor_id, first_name, last_name, specialty FROM healthcare.doctors WHERE hospital... |
You are an expert in writing database language. You can write a corresponding 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": "List all beneficiaries added to any policy in March 2024, including their beneficiary_id, policy_id, first and last name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT beneficiary_id, policy_id, first_name, last_name\nFROM insurance.policy_beneficia... |
You are an expert in writing database language. You can write a corresponding 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, ticker_symbol text, isin_code text... | [
{
"role": "user",
"content": "Count the number of securities and the number of distinct issuers for each sector.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT sector, COUNT(*) AS securities_count, COUNT(DISTINCT issuer_name) AS distinct_issuer_count FROM financial_services.secur... |
You are an expert in writing database language. You can write a corresponding 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.trips (
trip_id character varying(64) NOT NULL, -- unique identi... | [
{
"role": "user",
"content": "Show the average passenger_count for each trip status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT status, AVG(passenger_count) AS avg_passengers\nFROM transportation.trips\nGROUP BY status;",
"sql": null
},
{
"role": "user",
"cont... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.users ( user_id character varying(64) NOT NULL, username character vary... | [
{
"role": "user",
"content": "For hashtag ID 'H789', get each post ID and the number of distinct comments that have been made on those posts.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT ph.post_id,\n COUNT(DISTINCT c.comment_id) AS comment_count\nFROM social_media.post_h... |
You are an expert in writing database language. You can write a corresponding 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.wallets ( wallet_id text, user_id text, address text, private_key text, created... | [
{
"role": "user",
"content": "What is the total number of wallets recorded?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(*) FROM web3.wallets;",
"sql": null
},
{
"role": "user",
"content": "Can you show me the number of wallets created on each distinct dat... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.contracts ( contract_id character varying(64) NOT NULL, address character varyi... | [
{
"role": "user",
"content": "Show the wallet address, token symbol, and the total value received by each wallet for each token. Only include wallets that have received tokens.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT w.address AS wallet_address, t.token_symbol, SUM(tt.valu... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.lawyers (
lawyer_id character varying(64) NOT NULL, -- unique id... | [
{
"role": "user",
"content": "List all partners who have provided a phone number, showing their full name and email.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT first_name, last_name, email FROM legal_services.lawyers WHERE is_partner = TRUE AND phone IS NOT NULL;",
"sql":... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.clients ( client_id text PRIMARY KEY, first_name text, last_name text... | [
{
"role": "user",
"content": "I need a list of unique company names and the number of clients in each company.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT company_name, COUNT(*) AS client_count\nFROM legal_services.clients\nWHERE company_name IS NOT NULL\nGROUP BY company_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 government_services.citizens ( citizen_id text, national_id_number text, first_name ... | [
{
"role": "user",
"content": "List the first and last names of citizens who have submitted documents with a verification status of 'Rejected', along with the document type and application reference number.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.first_name, c.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 legal_services.clients ( client_id character varying(64) NOT NULL, first_name charac... | [
{
"role": "user",
"content": "Show me all cases opened in the year 2024, along with the full name of the client for each case.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.case_number, T1.case_name, T2.first_name, T2.last_name FROM cases AS T1 JOIN clients AS T2 ON T1.client... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.law_firms ( firm_id character varying(64) NOT NULL, firm_name charact... | [
{
"role": "user",
"content": "List all law firms founded in the year 2015. Show their names, phone numbers, and website.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT firm_name, phone, website\nFROM legal_services.law_firms\nWHERE EXTRACT(YEAR FROM founded_date) = 2015;",
"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.events (
event_id character varying(64) NOT NULL, -- unique identifier for... | [
{
"role": "user",
"content": "List the token_id, token_symbol, and token_name for all tokens where the symbol has more than 4 characters.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT token_id, token_symbol, token_name FROM web3.tokens WHERE LENGTH(token_symbol) > 4;",
"sql"... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.insurance_plans ( plan_id.text, plan_name.text, insurance_provider.text, ... | [
{
"role": "user",
"content": "Count how many insurance plans exist for each plan type.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT plan_type, COUNT(*) AS plan_count\nFROM healthcare.insurance_plans\nGROUP BY plan_type;",
"sql": null
},
{
"role": "user",
"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 trading_platform.users ( user_id character varying(64) NOT NULL, username character ... | [
{
"role": "user",
"content": "Show me the top 5 users who have created the most wallets, along with their email addresses and the total number of wallets they created.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.user_id, u.email, COUNT(w.wallet_id) AS wallet_count FROM tradi... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE trading_platform.assets (
asset_id character varying(64) NOT NULL, -- unique id... | [
{
"role": "user",
"content": "List all assets mentioned in DApp descriptions along with the DApp name and URL.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.name AS asset_name,\n a.symbol AS asset_symbol,\n d.name AS dapp_name,\n d.url\nFROM trading_platform.... |
You are an expert in writing database language. You can write a corresponding 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 text,... | [
{
"role": "user",
"content": "Get all active SUI coins with their owner and balance.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT coin_type, owner, balance\nFROM sui_coins\nWHERE status = 'active';",
"sql": null
},
{
"role": "user",
"content": "Join metadata to ... |
You are an expert in writing database language. You can write a corresponding 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 financial_services.customers ( customer_id text, first_name text, last_name text, da... | [
{
"role": "user",
"content": "List all trades for a given security, showing ticker_symbol, trade_id, account_id, trade_type, and total_amount.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s.ticker_symbol, t.trade_id, t.account_id, t.trade_type, t.total_amount\nFROM financial_se... |
You are an expert in writing database language. You can write a corresponding 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": "Find, for each case, pairs of documents where one document_type is 'Contract' and the other is 'Evidence'. Return the case_id, the name of the contract document as contract_name, and the name of the evidence document as evidence_name.",
"sql": null
},
{
"role": "ass... |
You are an expert in writing database language. You can write a corresponding 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, license_plate text, vin text, make text, ... | [
{
"role": "user",
"content": "For each trip, can you show the trip_id, number of passengers, and the make and model of the assigned vehicle?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT b.trip_id, COUNT(b.passenger_id) AS passenger_count, v.make, v.model\nFROM transportation.bo... |
You are an expert in writing database language. You can write a corresponding 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 claim documents that are police reports and were uploaded in the last 30 days, along with their file sizes.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT document_id, claim_id, file_name, file_size_bytes, uploaded_at FROM insurance.claim... |
You are an expert in writing database language. You can write a corresponding 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": "How many addresses on the Ethereum chain have an ROI between 2 and 4?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(*) AS address_count FROM smart_money_profit WHERE chain = 'Ethereum' AND roi >= 2 AND roi <= 4;",
"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.in_game_items ( item_id.uuid, game_id.uuid, item_name.text, item_t... | [
{
"role": "user",
"content": "List all items with rarity = 'Legendary', showing item_id, item_name, and cost_amount.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT item_id,\n item_name,\n cost_amount\nFROM gaming_technology.in_game_items\nWHERE rarity = 'Legendary';",... |
You are an expert in writing database language. You can write a corresponding 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": "Get me a list of law firms with the firm_name, founded_date, the managing partner's full name, and the total number of partners at that firm.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT f.firm_name, f.founded_date, mp.first_name || ' ' || mp.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 trading_platform.users ( user_id.text, username.text, email.text, password_hash.text... | [
{
"role": "user",
"content": "List the user IDs and usernames for all users who registered in the year 2024.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT user_id, username FROM trading_platform.users WHERE created_at >= '2024-01-01 00:00:00' AND created_at < '2025-01-01 00:00:0... |
You are an expert in writing database language. You can write a corresponding 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": "Can you list the invoice numbers, issue dates, and due dates for all invoices, sorted by issue date ascending?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT invoice_number, issue_date, due_date FROM legal_services.invoices ORDER BY issue_date ASC;",... |
You are an expert in writing database language. You can write a corresponding 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 the users who have never posted any public posts, showing user_id, username, and email.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.user_id, u.username, u.email FROM social_media.users u LEFT JOIN social_media.posts p ON p.user_id = u.user_... |
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, first_name text, last_nam... | [
{
"role": "user",
"content": "Show me the list of guests who were created in 2024, along with their first and last names and registration date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT guest_id, first_name, last_name, created_at FROM hospitality_technology.guests WHERE EXTR... |
You are an expert in writing database language. You can write a corresponding 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, agency_id text, service_name text, d... | [
{
"role": "user",
"content": "How many active services currently provide an online application URL?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(*)\nFROM government_services.services\nWHERE is_active = TRUE\n AND online_application_url 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 token_dexpool_info ( pair_address character varying(512) NOT NULL, -- the id of dexp... | [
{
"role": "user",
"content": "Find tokens on the 'Ethereum' chain with a 6-hour price increase above 5%, and include their net_flow and roi from smart money performance.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d.token_symbol, d.chain, d.price_change_percentage_6h, p.net_fl... |
You are an expert in writing database language. You can write a corresponding 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": "For each security, show the average daily volume from market data and the total quantity traded across all trades.",
"sql": null
},
{
"role": "assistant",
"content": "WITH MarketDataAgg AS ( SELECT security_id, AVG(volume) AS avg_daily_volume FROM financial_serv... |
You are an expert in writing database language. You can write a corresponding 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": "How many posts have been updated after they were created?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(*) AS updated_post_count\nFROM social_media.posts\nWHERE updated_at IS NOT NULL AND updated_at > created_at;",
"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.claims ( claim_id.text, policy_id.text, customer_id.text, incident_date.ti... | [
{
"role": "user",
"content": "Show all policy beneficiaries along with the total premium amount paid for the policy they are associated with.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.beneficiary_id, T1.first_name, T1.last_name, T1.policy_id, T1.percentage_share, SUM(T2.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 project_fundraising_record ( id character varying(32) NOT NULL, project_id character... | [
{
"role": "user",
"content": "List projects that raised funds in 2023 and have an associated token in token_basic_info. Show project_name, rounds_name, investment_value, token_symbol, and chain.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.project_name, p.rounds_name, p.inves... |
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, first_name text, last_name text, agenc... | [
{
"role": "user",
"content": "List all agents and their managers' full names.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.first_name, a.last_name, m.first_name AS manager_first_name, m.last_name AS manager_last_name FROM insurance.agents a LEFT JOIN insurance.agents m ON a.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 blockchain.nodes ( node_id text PRIMARY KEY, ip_address text, port int, last_seen ti... | [
{
"role": "user",
"content": "Retrieve all pairs of nodes that share the same port and were last seen on the same day. Include node_id, ip_address, and last_seen of both nodes.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT n1.node_id AS node_id1, n1.ip_address AS ip1, n1.last_se... |
You are an expert in writing database language. You can write a corresponding 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": "Show the top 5 properties by average overall review rating.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.property_name, AVG(r.rating_overall) AS avg_rating\nFROM hospitality_technology.properties p\nJOIN hospitality_technology.reviews r\n ON p.p... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.fuel_logs (
fuel_log_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "List each vehicle that has both Diesel and Gasoline fueling events. Show vehicle_id, the fuel_log_id and log_timestamp for the Diesel event, and the fuel_log_id and log_timestamp for the Gasoline event.",
"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 healthcare.medical_records (
record_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "Show me all prescriptions made by doctors who have issued diagnoses described as 'Hypertension'. Include the doctor's ID, prescription ID, medication ID, and prescription date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.doctor_id, p.prescriptio... |
You are an expert in writing database language. You can write a corresponding 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 text PRIMARY KEY, citizen_id text,... | [
{
"role": "user",
"content": "For each service ID, what is the average number of days between the submission date and the decision date for applications that have a recorded decision?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT service_id, AVG(EXTRACT(EPOCH FROM (decision_date... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.policies ( policy_id.text, customer_id.text, product_id.text, agent_id.tex... | [
{
"role": "user",
"content": "Show all policy numbers with their corresponding payment_id and amount_paid for payments made on or after January 1st, 2024.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.policy_number, pp.payment_id, pp.amount_paid\nFROM insurance.premium_payment... |
You are an expert in writing database language. You can write a corresponding 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": "Get all non-smoking rooms with status 'Available'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT room_id, property_id, room_number, floor\nFROM hospitality_technology.rooms\nWHERE is_smoking = FALSE\n AND status = 'Available';",
"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": "Show the job title, first name, and last name of all employees who were hired before 2010-01-01.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT job_title, first_name, last_name\nFROM government_services.employees\nWHERE hire_date < '2010-01-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 insurance.claims (
claim_id character varying(64) NOT NULL, -- unique identifier... | [
{
"role": "user",
"content": "For each claim, count the number of beneficiaries associated with its policy. Show claim_id and beneficiary_count, only for claims with more than 2 beneficiaries.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.claim_id, COUNT(pb.beneficiary_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 train_station_management.platforms (
platform_id character varying(64) NOT NULL,... | [
{
"role": "user",
"content": "Can you provide the total number of active trains in the database?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(*)\nFROM train_station_management.trains\nWHERE 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 legal_services.clients ( client_id text PRIMARY KEY, first_name text, last_name text... | [
{
"role": "user",
"content": "List the first name, last name, email, and phone number of all clients who have a case of type 'Bankruptcy', along with the name of the case.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.first_name , T1.last_name , T1.email , T1.phone , T2.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 healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birt... | [
{
"role": "user",
"content": "Count the number of patients whose address includes the word 'Street' and are male.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(*) FROM healthcare.patients WHERE address LIKE '%Street%' AND gender = 'Male';",
"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 blockchain.nodes ( node_id text PRIMARY KEY, ip_address text, port int, last_seen ti... | [
{
"role": "user",
"content": "Show me all nodes that were last seen in the past 30 days, along with their IP addresses and ports.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT node_id, ip_address, port, last_seen FROM blockchain.nodes WHERE last_seen >= NOW() - INTERVAL '30 days... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.policies ( policy_id text PRIMARY KEY, customer_id text, product_id text, ... | [
{
"role": "user",
"content": "List the first and last names of all agents who have sold policies of product type 'Auto', along with the name of the product they sold.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT T1.first_name, T1.last_name, T3.product_name FROM insuran... |
You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, record_id charac... | [
{
"role": "user",
"content": "List every diagnosis description paired with every insurance plan's website.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.description, T2.website FROM healthcare.diagnoses AS T1 CROSS JOIN healthcare.insurance_plans AS T2;",
"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": "Show me all customers who have purchased policies for insurance products of type 'health', including their full name, policy number, and the insurance product's name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.customer_id, 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 healthcare.medications ( medication_id text PRIMARY KEY, medication_name text, gener... | [
{
"role": "user",
"content": "List the medication IDs and names for all entries where the description is missing or empty.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT medication_id, medication_name FROM healthcare.medications WHERE description IS NULL OR description = '';",
... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.users ( user_id character varying(64) NOT NULL, username character vary... | [
{
"role": "user",
"content": "Show me the usernames and the count of comments they made on posts associated with the hashtag 'community'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.username, COUNT(c.comment_id) AS comment_count\nFROM social_media.users u\nJOIN 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 transportation.routes ( route_id text, route_number text, description text, origin_l... | [
{
"role": "user",
"content": "List the booking ID, trip ID, and the booking status for all bookings.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT booking_id, trip_id, status FROM transportation.bookings;",
"sql": null
},
{
"role": "user",
"content": "For these b... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.locations ( location_id character varying(64) NOT NULL, name characte... | [
{
"role": "user",
"content": "Show all locations in 'Texas' with their name, city, and type.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT location_id, name, city, type\nFROM transportation.locations\nWHERE state_province = 'Texas';",
"sql": null
},
{
"role": "user",... |
You are an expert in writing database language. You can write a corresponding 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 any appointments? Show their first and last name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT T1.first_name , T1.last_name FROM government_services.citizens AS T1 JOIN government_services.appointments AS 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 hospitality_technology.reviews ( review_id.text, property_id.text, reservation_id.te... | [
{
"role": "user",
"content": "What is the average overall rating grouped by review_source?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT review_source, AVG(rating_overall) AS avg_overall_rating, COUNT(*) AS review_count\nFROM hospitality_technology.reviews\nGROUP BY review_sourc... |
You are an expert in writing database language. You can write a corresponding 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": "Retrieve a list of all patient insurance policies, showing the subscriber name and the name of the insurance provider for the plan.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.subscriber_name, T2.insurance_provider FROM healthcare.patient_insur... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.guests (
guest_id character varying(64) NOT NULL, -- uni... | [
{
"role": "user",
"content": "Count the number of payments processed by each staff member. Display the staff ID and the count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT staff_id_processed, COUNT(*) FROM hospitality_technology.payments WHERE staff_id_processed IS NOT NULL GRO... |
You are an expert in writing database language. You can write a corresponding 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": "Which customers have a canceled policy along with another active policy? Give customer_id, canceled_policy_id, active_policy_id.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p_cancel.customer_id,\n p_cancel.policy_id AS canceled_policy_id,\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 hospitality_technology.properties ( property_id character varying(64) NOT NULL, prop... | [
{
"role": "user",
"content": "Provide the total number of reservations made for each property, including the property name and reservation count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.property_name, COUNT(r.reservation_id) AS reservation_count\nFROM hospitality_technol... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.reviews ( review_id character varying(64) NOT NULL, property_... | [
{
"role": "user",
"content": "Identify all pairs of reviews where the same guest reviewed the same property twice, listing both review IDs.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n r1.guest_id,\n r1.property_id,\n r1.review_id AS review_a,\n r2.review_id AS review_b\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.cases ( case_id.text, case_number.text, case_name.text, client_id.tex... | [
{
"role": "user",
"content": "List all appointments, including their subject and start time, along with the name and status of the case they are linked to.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.subject, T1.start_time, T2.case_name, T2.status FROM appointments AS T1 JO... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
Collection 'inspections'. Document structure: { _id: <ObjectId (or inspection_id)>, inspection_id... | [
{
"role": "user",
"content": "Can you help me retrieve inspection records for a specific step ID, including the inspection type, result, timestamp, and the associated build ID?",
"sql": null
},
{
"role": "assistant",
"content": "db.inspections.find({ step_id: 'specific_step_id' }, { inspecti... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.vehicles ( vehicle_id text PRIMARY KEY, license_plate text, vin text,... | [
{
"role": "user",
"content": "List the number of bookings made by each passenger, including passenger_id, first_name, last_name, and booking_count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.passenger_id,\n p.first_name,\n p.last_name,\n COUNT(b.booking_id... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.cases ( case_id text, case_number text, case_name text, client_id tex... | [
{
"role": "user",
"content": "For each case type, calculate the average time to close cases in days, only including cases that have been closed.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT case_type,\n AVG(EXTRACT(EPOCH FROM (date_closed - date_opened)) / 86400) AS avg_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.users ( user_id text PRIMARY KEY, username text, email text, password_h... | [
{
"role": "user",
"content": "How many users have non-empty full_name and bio fields? Return only the count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(*)\nFROM social_media.users\nWHERE full_name IS NOT NULL\n AND full_name <> ''\n AND bio IS NOT NULL\n AND bio <> '... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.maintenance_logs (
log_id character varying(64) NOT NULL, -- uni... | [
{
"role": "user",
"content": "Show me all vehicles that are due for their next service before the end of this month, along with their last service type and date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT vehicle_id, service_type, service_date FROM transportation.maintenance_... |
You are an expert in writing database language. You can write a corresponding 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": "List the document name, upload timestamp, and the full name of the lawyer who uploaded it, for all documents associated with case number 'CASE123'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.document_name , T1.upload_timestamp , T2.full_name... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash text,... | [
{
"role": "user",
"content": "Find all ERC20 tokens (from token_metas) currently held by wallet '0xfoo...' with a balance over 1000. Show the contract address and amount.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT contract_address, amount\nFROM erc20_balances\nWHERE wallet_ad... |
You are an expert in writing database language. You can write a corresponding 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": "List the product ID, product name, and base premium for all insurance products created in 2022.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT product_id, product_name, base_premium\nFROM insurance.insurance_products\nWHERE EXTRACT(YEAR FROM created_... |
You are an expert in writing database language. You can write a corresponding 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.comments ( comment_id text PRIMARY KEY, post_id text, user_id text, par... | [
{
"role": "user",
"content": "I want a list of group conversations with at least one unread message, including the conversation_id, group_name, and the count of unread messages, joining messages and conversations tables.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.conversati... |
You are an expert in writing database language. You can write a corresponding 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": "List smart money addresses with a realized ratio greater than 0.9 and a profit greater than 50000. Show the address, chain, realized ratio, and profit.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT address, chain, realized_ratio, profit FROM smart_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 transportation.vehicles (
vehicle_id character varying(64) NOT NULL, -- unique ... | [
{
"role": "user",
"content": "List all depots (location type 'Depot') and the number of vehicles assigned to each. Include the depot name and city.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.name , T1.city , COUNT(T2.vehicle_id) FROM transportation.locations AS T1 LEFT J... |
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, patient_id text, doctor_i... | [
{
"role": "user",
"content": "I need to identify overlapping appointments for each doctor. Return doctor_id, the first appointment_id, the overlapping appointment_id, and the overlap start time.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT A.doctor_id,\n A.appointment_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 insurance.insurance_products ( product_id text PRIMARY KEY, product_name text, produ... | [
{
"role": "user",
"content": "Retrieve the count of active insurance products for each product_type and order the results by the count descending.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT product_type,\n COUNT(*) AS active_count\nFROM insurance.insurance_products\nWHE... |
You are an expert in writing database language. You can write a corresponding 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": "Show me all invoices where the notes field is not null. Display invoice number, client ID, and notes.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT invoice_number, client_id, notes FROM legal_services.invoices WHERE notes IS NOT NULL;",
"sql": 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 gaming_technology.games ( game_id.uuid, title.text, developer_id.uuid, publisher_id.... | [
{
"role": "user",
"content": "Could you list the title of each game and the total quantity of items acquired by players for that specific game?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT g.title, SUM(pi.quantity) AS total_acquired_quantity FROM gaming_technology.games g JOIN ... |
You are an expert in writing database language. You can write a corresponding 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": "For each type of entity a notification can be related to, how many notifications have been successfully sent?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT related_entity_type, COUNT(*) AS sent_notification_count FROM government_services.notificatio... |
You are an expert in writing database language. You can write a corresponding 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 text PRIMARY KEY, application_id text, c... | [
{
"role": "user",
"content": "How many documents are in each verification_status?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT verification_status, COUNT(*) AS document_count\nFROM government_services.documents\nGROUP BY verification_status;",
"sql": null
},
{
"role... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.lawyers ( lawyer_id.text, first_name.text, last_name.text, bar_number... | [
{
"role": "user",
"content": "Show me all lawyers who are not partners.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.lawyer_id, T1.first_name, T1.last_name FROM legal_services.lawyers AS T1 WHERE T1.is_partner = FALSE",
"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 gaming_technology.developers (
developer_id uuid NOT NULL DEFAULT gen_random_uui... | [
{
"role": "user",
"content": "How many developers are there in each country?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n country,\n COUNT(developer_id) AS developer_count\nFROM\n gaming_technology.developers\nWHERE country IS NOT NULL\nGROUP BY\n country;",
"sql": nu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.