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.players ( player_id uuid NOT NULL DEFAULT gen_random_uuid(), usern...
[ { "role": "user", "content": "Show the usernames and registration dates of all players whose last_login is NULL.", "sql": null }, { "role": "assistant", "content": "SELECT username, registration_date FROM gaming_technology.players WHERE last_login IS NULL;", "sql": null }, { "rol...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.customers ( customer_id.text, first_name.text, last_name.text, date_of_bir...
[ { "role": "user", "content": "Show all claims handled by agents who have uploaded at least one claim document. Include the claim_id, agent's uploaded document_id, and the incident date.", "sql": null }, { "role": "assistant", "content": "SELECT c.claim_id, cd.document_id, c.incident_date\nFR...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id.text, license_plate.text, vin.text, make.text, ...
[ { "role": "user", "content": "List all pairs of vehicles in the same depot with different status. Include both vehicle IDs with their statuses and the depot_id.", "sql": null }, { "role": "assistant", "content": "SELECT v1.vehicle_id AS vehicle1_id,\n v1.status AS status1,\n ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.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 legal_services.time_entries ( entry_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "List all time entries where the description includes the word 'email', showing the entry ID, date worked, hours spent, and description.", "sql": null }, { "role": "assistant", "content": "SELECT entry_id, date_worked, hours_spent, description FROM legal_services...
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 specific tools or equipment used during the maintenance with record_id 'REC456'?", "sql": null }, { "role": "assistant", "content": "I'm sorry, but I can't provide information about the specific tools or equipment used during a maintenance record. 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 erc20_balances ( block_number bigint NOT NULL, contract_address varchar NOT NULL, wa...
[ { "role": "user", "content": "List all NFTs minted on the Ethereum blockchain in the last 14 days, including their contract address, token ID, name, and minter.", "sql": null }, { "role": "assistant", "content": "SELECT contract_address, token_id, name, minter\nFROM nft_metadata\nWHERE block...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.applications ( application_id character varying(64) NOT NULL, ci...
[ { "role": "user", "content": "Provide a count of documents grouped by their current verification status.", "sql": null }, { "role": "assistant", "content": "SELECT verification_status, COUNT(*) FROM government_services.documents GROUP BY verification_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 financial_services.loans ( loan_id text, account_id text, loan_type text, principal_...
[ { "role": "user", "content": "Show me all loans with a term longer than 36 months, including their loan_id, account_id, and principal_amount.", "sql": null }, { "role": "assistant", "content": "SELECT loan_id, account_id, principal_amount FROM financial_services.loans WHERE term_months > 36;...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE blockchain.smart_contracts ( contract_id text PRIMARY KEY, creator_address text, cod...
[ { "role": "user", "content": "Show me the earliest created smart contract for each creator address.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT ON (creator_address) contract_id, creator_address, code, timestamp FROM blockchain.smart_contracts ORDER BY creator_address,...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.invoices ( invoice_id.text, invoice_number.text, client_id.text, case...
[ { "role": "user", "content": "Which clients have appointments scheduled for a case that also has at least one invoice issued? Please show the client_id, appointment_id, appointment start_time, related case_id, and invoice_number.", "sql": null }, { "role": "assistant", "content": "SELECT a.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 legal_services.lawyers ( lawyer_id.text, first_name.text, last_name.text, bar_number...
[ { "role": "user", "content": "I need to list pairs of partners working at the same firm, showing each partner's full name and their specialization.", "sql": null }, { "role": "assistant", "content": "SELECT CONCAT(p1.first_name, ' ', p1.last_name) AS partner1_name, p1.specialization, CONCAT(...
You are an expert in writing database language. You can write a corresponding 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 text, agency_id text, first_name text, l...
[ { "role": "user", "content": "Show the full name, job title, and termination date for all employees whose job title includes the word 'Specialist' and who are no longer employed.", "sql": null }, { "role": "assistant", "content": "SELECT first_name, last_name, job_title, termination_date FRO...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.fuel_logs ( fuel_log_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "I need the total fuel cost per vehicle for each fuel type.", "sql": null }, { "role": "assistant", "content": "SELECT vehicle_id, fuel_type, SUM(total_cost) AS total_cost_per_type\nFROM transportation.fuel_logs\nGROUP BY vehicle_id, fuel_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.notifications ( notification_id.text, user_id.text, message.text, s...
[ { "role": "user", "content": "For each user, show their username and the timestamp of their most recent notification. Include users who have never received notifications.", "sql": null }, { "role": "assistant", "content": "SELECT T1.username, max(T2.sent_at) FROM users AS T1 LEFT JOIN tradin...
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, name text, country tex...
[ { "role": "user", "content": "Can you list each developer name alongside another developer from the same country?", "sql": null }, { "role": "assistant", "content": "SELECT d1.name AS dev1, d2.name AS dev2, d1.country\nFROM developers d1\nJOIN developers d2\n ON d1.country = d2.country\n 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 hospitality_technology.properties ( property_id character varying(64) NOT NULL, ...
[ { "role": "user", "content": "List all reservations along with their guest's full name and the total amount, for reservations that have more than 2 adults.", "sql": null }, { "role": "assistant", "content": "SELECT r.reservation_id, g.first_name || ' ' || g.last_name AS guest_full_name, r.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 government_services.documents ( document_id text, application_id text, citizen_id te...
[ { "role": "user", "content": "For each employee who has verified documents, show their full name and the total number of documents they have verified with a status of 'Verified'.", "sql": null }, { "role": "assistant", "content": "SELECT e.full_name, COUNT(d.document_id) FROM government_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 insurance.policies ( policy_id.text, customer_id.text, product_id.text, agent_id.tex...
[ { "role": "user", "content": "For policies issued in the current year, show me the total premium_amount and the average deductible grouped by policy status.", "sql": null }, { "role": "assistant", "content": "SELECT status,\n SUM(premium_amount) AS total_premium,\n AVG(deductible...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.customers ( customer_id text, first_name text, last_name text, date_of_bir...
[ { "role": "user", "content": "List pairs of customers who live in the same city. Return both customer IDs, their full names, and the city.", "sql": null }, { "role": "assistant", "content": "SELECT c1.customer_id AS customer1_id, c1.first_name || ' ' || c1.last_name AS customer1_name, c2.cus...
You are an expert in writing database language. You can write a corresponding 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.premium_payments ( payment_id text PRIMARY KEY, policy_id text, customer_i...
[ { "role": "user", "content": "For each policy, find the latest payment date. Show the policy_id and the maximum payment_date.", "sql": null }, { "role": "assistant", "content": "SELECT policy_id, MAX(payment_date) AS latest_payment_date FROM insurance.premium_payments GROUP BY policy_id;", ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.service_orders ( order_id text, reservation_id text, guest_id...
[ { "role": "user", "content": "Which day had the highest number of service orders? Show the date and order count.", "sql": null }, { "role": "assistant", "content": "SELECT DATE(order_timestamp) AS order_date,\n COUNT(*) AS order_count\nFROM hospitality_technology.service_orders\nGROUP ...
You are an expert in writing database language. You can write a corresponding 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": "Can you show me all invoices with their invoice number, total amount, due date, and the full name of the client associated with the invoice?", "sql": null }, { "role": "assistant", "content": "SELECT i.invoice_number, i.total_amount, i.due_date, c.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 gaming_technology.achievements ( achievement_id.uuid, game_id.uuid, name.text, descr...
[ { "role": "user", "content": "List all achievements with points greater than 100, showing achievement_id, name, and points.", "sql": null }, { "role": "assistant", "content": "SELECT achievement_id, name, points\nFROM gaming_technology.achievements\nWHERE points > 100;", "sql": null },...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id.text, license_plate.text, vin.text, make.text, ...
[ { "role": "user", "content": "List each service_type and the number of maintenance logs performed for that type, only including service_types with more than 10 records.", "sql": null }, { "role": "assistant", "content": "SELECT service_type,\n COUNT(*) AS log_count\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 healthcare.prescriptions ( prescription_id text, record_id text, patient_id text, do...
[ { "role": "user", "content": "Can you show me all prescriptions along with each patient's policy number and insurance plan ID?", "sql": null }, { "role": "assistant", "content": "SELECT p.prescription_id, p.patient_id, p.medication_id, pi.policy_number, pi.plan_id\nFROM healthcare.prescripti...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.clients ( client_id character varying(64) NOT NULL, -- unique id...
[ { "role": "user", "content": "Show the number of documents uploaded for each case, including the case number and the case name.", "sql": null }, { "role": "assistant", "content": "SELECT c.case_number, c.case_name, COUNT(d.document_id) AS document_count\nFROM legal_services.cases c\nJOIN leg...
You are an expert in writing database language. You can write a corresponding 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": "List tokens on 'Arbitrum' with liquidity over 5000000.", "sql": null }, { "role": "assistant", "content": "SELECT * FROM token_dexpool_info WHERE chain = 'Arbitrum' AND liquidity > 5000000;", "sql": null }, { "role": "user", "content": "Filter 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 web3.events ( event_id.text, contract_id.text, event_name.text, data.text, emitted_a...
[ { "role": "user", "content": "Find all failed transactions along with the token transfers involved in those transactions, showing the transaction details and token information.", "sql": null }, { "role": "assistant", "content": "SELECT t.transaction_id, t.from_address, t.to_address, t.status...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.premium_payments ( payment_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "Calculate the average and maximum payment amount grouped by payment status.", "sql": null }, { "role": "assistant", "content": "SELECT status,\n AVG(amount_paid) AS avg_amount,\n MAX(amount_paid) AS max_amount\nFROM insurance.premium_payments\nGROUP ...
You are an expert in writing database language. You can write a corresponding 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": "Can you provide a list of all players who have acquired at least one item, along with the item name, its type, and the title of the game that item belongs to?", "sql": null }, { "role": "assistant", "content": "SELECT pi.player_id, items.item_name, items.item_ty...
You are an expert in writing database language. You can write a corresponding 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": "Count the number of transactions for each status.", "sql": null }, { "role": "assistant", "content": "SELECT status, COUNT(*) AS tx_count\nFROM web3.transactions\nGROUP BY status;", "sql": null }, { "role": "user", "content": "Actually, only incl...
You are an expert in writing database language. You can write a corresponding 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": "Which users have participated in conversations that are not group chats? Please show their usernames and the conversation IDs.", "sql": null }, { "role": "assistant", "content": "SELECT u.username, cp.conversation_id\nFROM social_media.conversation_participants ...
You are an expert in writing database language. You can write a corresponding 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": "Get all documents uploaded by lawyers who are partners.", "sql": null }, { "role": "assistant", "content": "SELECT d.document_id, d.document_name, d.case_id, d.upload_timestamp\nFROM legal_services.documents d\nJOIN legal_services.lawyers l ON d.uploaded_by_lawy...
You are an expert in writing database language. You can write a corresponding 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, patient_id ch...
[ { "role": "user", "content": "Show me all medical records created in the last 6 months.", "sql": null }, { "role": "assistant", "content": "SELECT * FROM healthcare.medical_records WHERE record_date >= CURRENT_DATE - INTERVAL '6 months';", "sql": null }, { "role": "user", "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 healthcare.doctors ( doctor_id text, first_name text, last_name text, specialty text...
[ { "role": "user", "content": "Find all prescriptions for patients who have at least one appointment scheduled in the future. Show the prescription ID, patient ID, medication name, and the earliest future appointment time for that patient.", "sql": null }, { "role": "assistant", "content": "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 token_metas ( block_timestamp.timestamp, block_number.bigint, transaction_hash.text,...
[ { "role": "user", "content": "List all active SUI coins (status 'exists') with their `coin_type`, `symbol`, `name`, and the total balance across all owners.", "sql": null }, { "role": "assistant", "content": "SELECT sc.coin_type,\n sm.symbol,\n sm.name,\n SUM(CAST(sc.balanc...
You are an expert in writing database language. You can write a corresponding 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.notifications ( notification_id character varying(64) NOT NULL, recipie...
[ { "role": "user", "content": "Count the number of unread notifications for each notification_type across all users.", "sql": null }, { "role": "assistant", "content": "SELECT\n notification_type,\n COUNT(*) AS unread_count\nFROM social_media.notifications\nWHERE read_at IS NULL\nGROUP BY 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.claims ( claim_id text PRIMARY KEY, policy_id text, customer_id text, inci...
[ { "role": "user", "content": "Find claims where the estimated loss is greater than the average estimated loss for claims with a status of 'Closed'. Show the claim ID, incident date, estimated loss, and status.", "sql": null }, { "role": "assistant", "content": "SELECT claim_id, incident_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 healthcare.doctors ( doctor_id text, first_name text, last_name text, specialty text...
[ { "role": "user", "content": "Retrieve all unique chief complaints from medical_records.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT chief_complaint\nFROM healthcare.medical_records;", "sql": null }, { "role": "user", "content": "Now show chief complai...
You are an expert in writing database language. You can write a corresponding 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, citizen_id text, employee_id...
[ { "role": "user", "content": "Show me all appointment IDs and their scheduled start times along with the employee ID and service ID for appointments that have been booked using the 'Kiosk' booking method.", "sql": null }, { "role": "assistant", "content": "SELECT appointment_id, scheduled_st...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.users ( user_id character varying(64) NOT NULL, -- unique identifi...
[ { "role": "user", "content": "I need to get the most recent message each verified user has sent in any group chat, showing username, group_name, message_id, and sent_at.", "sql": null }, { "role": "assistant", "content": "WITH user_recent AS (\n SELECT m.sender_user_id, m.message_id, m.conv...
You are an expert in writing database language. You can write a corresponding 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 fundraising round, can you list the total amount invested and the corresponding number of projects in that round, as well as the highest token market cap associated with any project of that round? Please show the round name, total investment, project count, and max 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 social_media.hashtags ( hashtag_id character varying(64) NOT NULL, -- unique ide...
[ { "role": "user", "content": "List all hashtags created after '2024-06-01', showing hashtag_id and tag_name.", "sql": null }, { "role": "assistant", "content": "SELECT hashtag_id, tag_name\nFROM social_media.hashtags\nWHERE created_at > '2024-06-01';", "sql": null }, { "role": "u...
You are an expert in writing database language. You can write a corresponding 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": "Find all medications where the generic name includes the text 'hydrochloride'. Display the medication name and generic name.", "sql": null }, { "role": "assistant", "content": "SELECT medication_name, generic_name FROM healthcare.medications WHERE generic_name L...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.transactions ( transaction_id text, from_address text, to_address text, value n...
[ { "role": "user", "content": "List all pairs of transactions within the same block where the from_address of one transaction is the to_address of another transaction. Show both transaction_ids, the block_number, from_address, and to_address.", "sql": null }, { "role": "assistant", "content":...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.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 hospitality_technology.reviews ( review_id text, property_id text, reservation_id te...
[ { "role": "user", "content": "Give me a breakdown of the number of reviews per day for the last 14 days, including the review_date and review count.", "sql": null }, { "role": "assistant", "content": "SELECT DATE(review_date) AS review_day, COUNT(*) AS review_count\nFROM hospitality_technolo...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.insurance_plans ( plan_id.text, plan_name.text, insurance_provider.text, ...
[ { "role": "user", "content": "List plan_id, plan_name, and contact_phone for all insurance plans whose website ends with '.org' and that have at least one other plan with the same contact_phone.", "sql": null }, { "role": "assistant", "content": "SELECT a.plan_id, a.plan_name, a.contact_phon...
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, title text, developer_id uuid, p...
[ { "role": "user", "content": "What is the average score across all game sessions for each game? Include the game title and the average score.", "sql": null }, { "role": "assistant", "content": "SELECT T1.title, AVG(T2.score) FROM gaming_technology.games AS T1 JOIN gaming_technology.game_sess...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.staff ( staff_id character varying(64) NOT NULL, property_id ...
[ { "role": "user", "content": "List all staff members along with their direct manager's first and last names.", "sql": null }, { "role": "assistant", "content": "SELECT s.staff_id,\n s.first_name AS staff_first_name,\n s.last_name AS staff_last_name,\n m.first_name AS manage...
You are an expert in writing database language. You can write a corresponding 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, -- unique identi...
[ { "role": "user", "content": "Find all doctors who were created in the last 3 months and have both an email address and phone number listed, showing their full names and contact details.", "sql": null }, { "role": "assistant", "content": "SELECT first_name, last_name, phone_number, email FRO...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.players ( player_id uuid PRIMARY KEY, username text, email text, p...
[ { "role": "user", "content": "Show me a list of in-game items where the total number held by all players exceeds 100, including the item name and rarity.", "sql": null }, { "role": "assistant", "content": "SELECT i.item_id, i.item_name, i.rarity, SUM(pi.quantity) AS total_quantity\nFROM 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 financial_services.securities ( security_id text, ticker_symbol text, isin_code text...
[ { "role": "user", "content": "Show me all securities (security_id, ticker_symbol, security_name) that are traded on the NASDAQ exchange and belong to the 'Technology' sector, along with their last_updated timestamp.", "sql": null }, { "role": "assistant", "content": "SELECT security_id, tick...
You are an expert in writing database language. You can write a corresponding 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, route_id character va...
[ { "role": "user", "content": "What is the average maintenance cost per vehicle?", "sql": null }, { "role": "assistant", "content": "SELECT vehicle_id, AVG(cost) AS avg_cost\nFROM transportation.maintenance_logs\nGROUP BY vehicle_id;", "sql": null }, { "role": "user", "content...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.fuel_logs ( fuel_log_id.text, vehicle_id.text, trip_id.text, log_time...
[ { "role": "user", "content": "Identify all instances where a vehicle's odometer_reading increased by more than 500 miles between two consecutive fuel log entries.", "sql": null }, { "role": "assistant", "content": "SELECT a.vehicle_id,\n a.fuel_log_id AS previou...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure // Use Hashes to store station details. Key format: station:<station_id> // Example: // HSET stat...
[ { "role": "user", "content": "能否帮我查询特定路线(route_id 为 'route_ne_corr')上的所有车站信息,并包含每个车站的平台数量?", "sql": null }, { "role": "assistant", "content": "ZRANGE route:route_ne_corr:stops 0 -1\nHGETALL route_station:<route_station_id> for each route_station_id in result\nHGETALL station:<station_id> for...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.customers ( customer_id text, first_name text, last_name text, date_of_bir...
[ { "role": "user", "content": "Which customers have policies that expired in the last month? Please show the customer ID, policy number, and expiration date.", "sql": null }, { "role": "assistant", "content": "SELECT c.customer_id, p.policy_number, p.end_date\nFROM insurance.customers c\nJOIN...
You are an expert in writing database language. You can write a corresponding 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": "For each fuel_type, can you calculate the total total_cost and the average total_cost from the fuel_logs table?", "sql": null }, { "role": "assistant", "content": "SELECT fuel_type,\n SUM(total_cost) AS total_cost_sum,\n AVG(total_cost) AS average_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 hospitality_technology.service_orders ( order_id text PRIMARY KEY, reservation_id te...
[ { "role": "user", "content": "List the total number of service orders placed by each staff member who delivered the service.", "sql": null }, { "role": "assistant", "content": "SELECT staff_id_delivered, COUNT(*) AS order_count FROM hospitality_technology.service_orders GROUP BY staff_id_del...
You are an expert in writing database language. You can write a corresponding 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": "List all users who have sent messages containing media files in group conversations, showing their username, email, and the group name.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT u.username, u.email, c.group_name\nFROM social_media.messa...
You are an expert in writing database language. You can write a corresponding 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": "Show all SUI coins owned by each address where the coin's status is 'exists'. Include the coin_type, owner, and balance.", "sql": null }, { "role": "assistant", "content": "SELECT coin_type, owner, balance\nFROM sui_coins\nWHERE status = 'exists';", "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 narrative_info ( narrative.text, top_3_coins.text, price_change_percentage_1h.numeri...
[ { "role": "user", "content": "List all pairs of narratives where the first narrative has a higher market_cap than the second. Display narrative1, narrative2, cap1, cap2.", "sql": null }, { "role": "assistant", "content": "SELECT n1.narrative AS narrative1, n2.narrative AS narrative2, n1.mark...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id character varying(64) NOT NULL, license_plate c...
[ { "role": "user", "content": "List all diesel fuel logs from the last 3 months with their vehicle details and total cost.", "sql": null }, { "role": "assistant", "content": "SELECT f.fuel_log_id, f.log_timestamp, v.vehicle_id, v.make, v.model, f.quantity, f.total_cost FROM transportation.fue...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.agents ( agent_id.text, first_name.text, last_name.text, agency_name.text,...
[ { "role": "user", "content": "Find the average commission rate among all agents whose hire date is after '2020-01-01'.", "sql": null }, { "role": "assistant", "content": "SELECT AVG(commission_rate) FROM insurance.agents WHERE hire_date > '2020-01-01';", "sql": null } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.reservations ( reservation_id.text, property_id.text, guest_i...
[ { "role": "user", "content": "Find pairs of reservations for the same guest at the same property where the check-in date of the second reservation is the same as the check-out date of the first reservation. List guest ID, property ID, and both reservation IDs.", "sql": null }, { "role": "assista...
You are an expert in writing database language. You can write a corresponding 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": "Which citizens have received notifications for applications processed by employees from the 'Legal' department? List the citizen ID, full name, and notification ID.", "sql": null }, { "role": "assistant", "content": "SELECT n.citizen_id, CONCAT(e.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 token_metas ( block_timestamp.timestamp, block_number.bigint, transaction_hash.text,...
[ { "role": "user", "content": "Show me the top 5 NFT collections on Ethereum with the highest number of unique owners, along with their names and floor prices.", "sql": null }, { "role": "assistant", "content": "SELECT nc.name, nc.floor_price, COUNT(DISTINCT nh.wallet_address) AS unique_owner...
You are an expert in writing database language. You can write a corresponding 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 snapshot t...
[ { "role": "user", "content": "Show me the top 5 tokens by USD value held on the Binance Smart Chain, along with their average price and total balance.", "sql": null }, { "role": "assistant", "content": "SELECT token_symbol, SUM(usd_value) as total_usd_value, AVG(price) as average_price, SUM(...
You are an expert in writing database language. You can write a corresponding 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": "Show me all loans with matching collateral, displaying loan_id, principal_amount, the collateral ticker, and its sector.", "sql": null }, { "role": "assistant", "content": "SELECT\n l.loan_id,\n l.principal_amount,\n s.ticker_symbol,\n s.sector\nFROM financi...
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, invoice_number text UNIQUE, c...
[ { "role": "user", "content": "For each client, show the earliest and latest invoice issue_date, along with the total amount invoiced. Include client_id, earliest_issue_date, latest_issue_date, and total_amount.", "sql": null }, { "role": "assistant", "content": "SELECT client_id, MIN(issue_d...
You are an expert in writing database language. You can write a corresponding 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": "Please list the full name and status of clients who have not provided a company name.", "sql": null }, { "role": "assistant", "content": "SELECT first_name, last_name, status\nFROM legal_services.clients\nWHERE company_name IS NULL;", "sql": null } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.documents ( document_id character varying(64) NOT NULL, -- u...
[ { "role": "user", "content": "Provide a count of appointments grouped by the booking method.", "sql": null }, { "role": "assistant", "content": "SELECT booking_method, COUNT(*) AS appointment_count FROM government_services.appointments GROUP BY booking_method;", "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 each client's first_name, last_name and the sum of total_amount from invoices where status is either 'Sent' or 'Paid'.", "sql": null }, { "role": "assistant", "content": "SELECT c.first_name, c.last_name, SUM(i.total_amount) AS total_amount_sum\nFROM legal_...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.patient_insurance ( patient_insurance_id.text, patient_id.text, plan_id.t...
[ { "role": "user", "content": "Count how many insurance policies have an effective date in the year 2023.", "sql": null }, { "role": "assistant", "content": "SELECT COUNT(*) FROM healthcare.patient_insurance WHERE EXTRACT(YEAR FROM effective_date) = 2023;", "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": "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 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 transportation.vehicles ( vehicle_id character varying(64) NOT NULL, -- unique ...
[ { "role": "user", "content": "I need a list of all routes and the number of trips made on each route.", "sql": null }, { "role": "assistant", "content": "SELECT route_id, COUNT(*) AS trip_count\nFROM transportation.trips\nGROUP BY route_id;", "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 social_media.comments ( comment_id text PRIMARY KEY, post_id text, user_id text, par...
[ { "role": "user", "content": "For each conversation, how many participants have joined before January 1, 2024?", "sql": null }, { "role": "assistant", "content": "SELECT conversation_id, COUNT(user_id) AS participant_count\nFROM social_media.conversation_participants\nWHERE joined_at < '2024...
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, first_name text, last_name text, ...
[ { "role": "user", "content": "Find all pairs of patients who share the same emergency_contact_name. Show patient IDs and the shared emergency contact name.", "sql": null }, { "role": "assistant", "content": "SELECT p1.patient_id AS patient1_id, p2.patient_id AS patient2_id, p1.emergency_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 insurance.customers ( customer_id character varying(64) NOT NULL, -- unique ide...
[ { "role": "user", "content": "Which customers have filed claims that are currently under review, and what are the details of those claims?", "sql": null }, { "role": "assistant", "content": "SELECT c.customer_id, c.first_name, c.last_name, cl.claim_id, cl.incident_date, cl.description, cl.st...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.passengers ( passenger_id character varying(64) NOT NULL, -- uni...
[ { "role": "user", "content": "Show me the first name, last name, and email address for passengers who have made a booking with 'Completed' status.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT p.first_name, p.last_name, p.email FROM transportation.passengers p JOIN tran...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.users ( user_id text, username text, email text, password_hash text, fu...
[ { "role": "user", "content": "List each verified user's username and their total number of public posts.", "sql": null }, { "role": "assistant", "content": "SELECT u.username, COUNT(p.post_id) AS post_count\nFROM social_media.users u\nLEFT JOIN social_media.posts p ON u.user_id = p.user_id A...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE token_basic_info ( coin_id character varying(100) NOT NULL, -- the id of the token t...
[ { "role": "user", "content": "Retrieve the top 5 tokens by 24h price_change_percentage_24h from token_basic_info along with their chain, narrative, and total 24h trading volume. Also include the narrative's token count from narrative_info.", "sql": null }, { "role": "assistant", "content": "...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.posts ( post_id text PRIMARY KEY, user_id text, content text, media_url...
[ { "role": "user", "content": "List the usernames of users who have joined a conversation and sent at least one message in it. Include the conversation_id for each.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT u.username, cp.conversation_id\nFROM social_media.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 gaming_technology.players ( player_id uuid NOT NULL DEFAULT gen_random_uuid(), -...
[ { "role": "user", "content": "Can you list all game servers, showing their name, the game title, and the region?", "sql": null }, { "role": "assistant", "content": "SELECT\n T1.server_name,\n T2.title,\n T1.region\nFROM gaming_technology.servers AS T1\nINNER JOIN gaming_technology.games 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 trading_platform.peers ( peer_id character varying(64) NOT NULL, ip_address characte...
[ { "role": "user", "content": "List all peers whose IP address ends with '.255', showing their peer_id, ip_address, and last_seen timestamp.", "sql": null }, { "role": "assistant", "content": "SELECT peer_id, ip_address, last_seen FROM trading_platform.peers WHERE ip_address LIKE '%.255';", ...
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, first_name text, last_name text...
[ { "role": "user", "content": "I need the case_number and case_name along with the total billing amount (hours_spent * billing_rate) for cases that are currently open.", "sql": null }, { "role": "assistant", "content": "SELECT c.case_number, c.case_name, SUM(te.hours_spent * te.billing_rate) ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.patients ( patient_id character varying(64) NOT NULL, first_name characte...
[ { "role": "user", "content": "Show me the top 5 most recent medical records with a fever recorded. Return record_id, patient_id, record_date, and the temperature value from vitals.", "sql": null }, { "role": "assistant", "content": "SELECT record_id,\n patient_id,\n record_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 social_media.posts ( post_id.text, user_id.text, content.text, media_url.text, media...
[ { "role": "user", "content": "Which five users have the most followers? Show the following_user_id and the number of followers each has.", "sql": null }, { "role": "assistant", "content": "SELECT following_user_id, COUNT(follower_user_id) AS follower_count\nFROM social_media.follows\nGROUP 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 social_media.hashtags ( hashtag_id.text, tag_name.text, created_at.timestamp )
[ { "role": "user", "content": "List all pairs of hashtags created within the same hour, including both hashtag IDs and their creation timestamps.", "sql": null }, { "role": "assistant", "content": "SELECT h1.hashtag_id AS hashtag1_id, h1.created_at AS created1, h2.hashtag_id AS hashtag2_id, 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 insurance.agents ( agent_id.text, first_name.text, last_name.text, agency_name.text,...
[ { "role": "user", "content": "List the file name and file size for all claim documents uploaded by agents whose license state is 'CA' and status is 'Active'.", "sql": null }, { "role": "assistant", "content": "SELECT T1.file_name, T1.file_size_bytes FROM insurance.claim_documents AS T1 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 gaming_technology.players ( player_id uuid PRIMARY KEY, username text, email text, p...
[ { "role": "user", "content": "I'd like to see, for each month, the total number of players who registered and how many of them are active versus inactive.", "sql": null }, { "role": "assistant", "content": "SELECT DATE_TRUNC('month', registration_date) AS month,\n COUNT(*) AS total_reg...
You are an expert in writing database language. You can write a corresponding 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 show each in-game item's name, its rarity, and the total quantity acquired by all players?", "sql": null }, { "role": "assistant", "content": "SELECT i.item_name, i.rarity, SUM(pi.quantity) AS total_quantity\nFROM gaming_technology.in_game_items i\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 hospitality_technology.staff ( staff_id text PRIMARY KEY, property_id text, first_na...
[ { "role": "user", "content": "List all staff members who processed payments for guest ID 'G123', including their first name, last name, and the payment ID.", "sql": null }, { "role": "assistant", "content": "SELECT T1.first_name, T1.last_name, T2.payment_id FROM staff AS T1 JOIN payments AS ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.clients ( client_id character varying(64) NOT NULL, first_name charac...
[ { "role": "user", "content": "List all law firms, showing their name, website, and the ID of their managing partner.", "sql": null }, { "role": "assistant", "content": "SELECT firm_name, website, managing_partner_id FROM law_firms;", "sql": null }, { "role": "user", "content"...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.citizens ( citizen_id character varying(64) NOT NULL, national_i...
[ { "role": "user", "content": "Count the number of registered citizens by gender.", "sql": null }, { "role": "assistant", "content": "SELECT\n gender,\n COUNT(*) AS citizen_count\nFROM government_services.citizens\nGROUP BY gender;", "sql": null } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.users ( user_id.text, username.text, email.text, password_hash.text, fu...
[ { "role": "user", "content": "Show me all pairs of usernames for users located in the same city along with their shared location.", "sql": null }, { "role": "assistant", "content": "SELECT u1.username AS user1, u2.username AS user2, u1.location\nFROM social_media.users u1\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 web3.contracts ( contract_id.text, address.text, abi.text, bytecode.text, deployer_a...
[ { "role": "user", "content": "Find all pairs of contracts deployed by the same deployer on the same day, showing the deployer_address, the deployment date, and both contract IDs.", "sql": null }, { "role": "assistant", "content": "SELECT c1.deployer_address,\n DATE(c1.deployed_at) AS d...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.drivers ( driver_id.text, employee_id.text, first_name.text, last_nam...
[ { "role": "user", "content": "For each driver, show their driver_id, first_name, last_name, along with any other driver whose license_expiry_date is earlier than theirs.", "sql": null }, { "role": "assistant", "content": "SELECT d1.driver_id AS driver_id,\n d1.first_name,\n ...