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 social_media.conversations ( conversation_id.text, created_at.timestamp, last_messag...
[ { "role": "user", "content": "List all users with private profiles who have disabled push notifications, including their user_id and email_notifications_enabled status.", "sql": null }, { "role": "assistant", "content": "SELECT user_id,\n email_notifications_enabled\nFROM 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 insurance.claim_documents ( document_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "Find all documents that have a description and list their document ID, file name, and description.", "sql": null }, { "role": "assistant", "content": "SELECT document_id, file_name, description FROM insurance.claim_documents WHERE description IS NOT NULL AND des...
You are an expert in writing database language. You can write a corresponding 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.conversation_participants ( participant_id text, conversation_id text, ...
[ { "role": "user", "content": "List all pairs of users who participated in the same conversation. For each, show conversation_id, user_id1, user_id2.", "sql": null }, { "role": "assistant", "content": "SELECT p1.conversation_id,\n p1.user_id AS user_id1,\n p2.user_id AS user_id2\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 transportation.vehicles ( vehicle_id character varying(64) NOT NULL, license_plate c...
[ { "role": "user", "content": "Show all trips with the trip ID, route number, and the full description of each route.", "sql": null }, { "role": "assistant", "content": "SELECT t.trip_id, r.route_number, r.description\nFROM transportation.trips t\nJOIN transportation.routes r ON t.route_id = ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.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 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 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 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 fuel consumption rate of train number T1234?", "sql": null }, { "role": "assistant", "content": "I'm sorry, but I don't have information on the fuel consumption rate of train number T1234. The data available in the system only includes details such 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 // db.createCollection('stations') // Optional: Add unique index: db.stations.createIndex({ stati...
[ { "role": "user", "content": "Can you help me retrieve the details of all bookings for a specific station with station_id 'station_xyz', including the associated schedule and passenger information?", "sql": null }, { "role": "assistant", "content": "db.bookings.aggregate([\n {\n $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 legal_services.appointments ( appointment_id character varying(64) NOT NULL, client_...
[ { "role": "user", "content": "What is the count of appointments for each lawyer? Display the lawyer ID and the total count.", "sql": null }, { "role": "assistant", "content": "SELECT lawyer_id, COUNT(*) AS appointment_count FROM legal_services.appointments GROUP BY lawyer_id;", "sql": nu...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE project_fundraising_record ( id character varying(32) NOT NULL, -- fundraising reco...
[ { "role": "user", "content": "List tokens in DEX pools with a 24-hour trading volume greater than $500,000 and a price less than $1. Show their symbol, chain, volume, and price.", "sql": null }, { "role": "assistant", "content": "SELECT token_symbol, chain, volume_24h, price FROM token_dexpo...
You are an expert in writing database language. You can write a corresponding 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 medications for each unique generic name. Show the generic name and the count.", "sql": null }, { "role": "assistant", "content": "SELECT\n generic_name,\n COUNT(medication_id) AS medication_count\nFROM healthcare.medications\nWHERE\n gene...
You are an expert in writing database language. You can write a corresponding 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": "For conversation 'C100', list participant usernames and when they last read the conversation.", "sql": null }, { "role": "assistant", "content": "SELECT u.username, cp.last_read_at\nFROM social_media.conversation_participants cp\nJOIN social_media.users u ON cp....
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.contracts ( contract_id character varying(64) NOT NULL, -- unique identifi...
[ { "role": "user", "content": "Show all contracts along with the number of events each contract has emitted. Include the contract address and the event count.", "sql": null }, { "role": "assistant", "content": "SELECT c.address, COUNT(e.event_id) AS event_count\nFROM web3.contracts c\nLEFT JO...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.diagnoses ( diagnosis_id character varying(64) NOT NULL, -- unique id...
[ { "role": "user", "content": "Count how many diagnoses entries are currently marked as 'Resolved'.", "sql": null }, { "role": "assistant", "content": "SELECT COUNT(*) FROM healthcare.diagnoses WHERE status = 'Resolved';", "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.bookings ( booking_id.text, passenger_id.text, trip_id.text, seat_num...
[ { "role": "user", "content": "Find all pairs of bookings that share the same payment_transaction_id.", "sql": null }, { "role": "assistant", "content": "SELECT b1.booking_id AS booking_id_1, b2.booking_id AS booking_id_2, b1.payment_transaction_id\nFROM transportation.bookings b1\nJOIN trans...
You are an expert in writing database language. You can write a corresponding 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 policies issued by active agents to customers in the 'CA' state, including policy number, customer's first and last name, agent's first and last name, and the agent's license state.", "sql": null }, { "role": "assistant", "content": "SELECT p.policy_number,...
You are an expert in writing database language. You can write a corresponding 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": "Show me all notifications where the target entity type is 'comment', and for each notification, include the content of the corresponding comment.", "sql": null }, { "role": "assistant", "content": "SELECT n.*, c.content AS comment_content FROM social_media.notif...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE token_metas ( block_timestamp.timestamp, block_number.bigint, transaction_hash.text,...
[ { "role": "user", "content": "For each ERC20 token contract, show the contract address and the total number of approval events recorded.", "sql": null }, { "role": "assistant", "content": "SELECT contract_address, COUNT(*) AS approval_count\nFROM erc20_approval\nGROUP BY contract_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 erc1155_approval_for_all ( block_number bigint NOT NULL, -- Block number contain...
[ { "role": "user", "content": "Show me all ERC1155 NFTs that were minted by wallet address '0x9876543210abcdef' on Ethereum, along with their contract address and token ID.", "sql": null }, { "role": "assistant", "content": "SELECT contract_address, token_id FROM nft_metadata WHERE blockchain...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id character varying(64) NOT NULL, prop...
[ { "role": "user", "content": "List each property and the number of available rooms. Only include properties with more than 10 available rooms.", "sql": null }, { "role": "assistant", "content": "SELECT p.property_id, p.property_name, COUNT(r.room_id) AS available_rooms\nFROM hospitality_tech...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.players ( player_id uuid PRIMARY KEY, username text, email text, p...
[ { "role": "user", "content": "List all item names and their rarity, along with the title of the game they belong to.", "sql": null }, { "role": "assistant", "content": "SELECT T1.item_name, T1.rarity, T2.title FROM in_game_items AS T1 JOIN games AS T2 ON T1.game_id = T2.game_id;", "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 social_media.comments ( comment_id text PRIMARY KEY, post_id text, user_id text, par...
[ { "role": "user", "content": "Show me the number of comments each user has made on each post.", "sql": null }, { "role": "assistant", "content": "SELECT post_id, user_id, COUNT(*) AS comment_count FROM social_media.comments GROUP BY post_id, user_id;", "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 transportation.drivers ( driver_id text PRIMARY KEY, employee_id text, first_name te...
[ { "role": "user", "content": "For each route, list the route number, description, and the combined total maintenance cost for all vehicles that have ever operated on that route.", "sql": null }, { "role": "assistant", "content": "WITH VehicleTotalMaintenance AS ( SELECT vehicle_id, SUM(cost)...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.token_transfers ( transfer_id text, token_id text, from_address text, to_addres...
[ { "role": "user", "content": "For each transaction, list the total value transferred and the number of different addresses involved (either as sender or receiver).", "sql": null }, { "role": "assistant", "content": "SELECT transaction_id, SUM(value) AS total_value_transferred, COUNT(DISTINCT...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.patients ( patient_id character varying(64) NOT NULL, -- unique iden...
[ { "role": "user", "content": "Show me a list of all appointments and the number of prescriptions that were issued on the same day for each appointment.", "sql": null }, { "role": "assistant", "content": "SELECT a.appointment_id, a.appointment_time::date AS appointment_date,\n COUNT(pr....
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE token_basic_info ( coin_id character varying(100) NOT NULL, token_name character var...
[ { "role": "user", "content": "For the 'DeFi' narrative, what is the average price, average market cap, and average 24-hour trading volume of its tokens?", "sql": null }, { "role": "assistant", "content": "SELECT AVG(price) AS avg_price, AVG(market_cap) AS avg_market_cap, AVG(CAST(total_volum...
You are an expert in writing database language. You can write a corresponding 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.text, chain.text, address.text, exchange.text, tok...
[ { "role": "user", "content": "What is the total USD value of tokens held by each exchange on Ethereum and Polygon chains in the latest snapshot? Please show exchange, chain, and total usd_value.", "sql": null }, { "role": "assistant", "content": "WITH latest_snapshot AS (\n SELECT MAX(snaps...
You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, ip_address character vary...
[ { "role": "user", "content": "Show me all nodes that haven't been seen in the last 24 hours.", "sql": null }, { "role": "assistant", "content": "SELECT node_id,\n ip_address,\n port,\n last_seen\nFROM blockchain.nodes\nWHERE last_seen < NOW() - INTERVAL '24 hours';", "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.tokens ( token_id character varying(64) NOT NULL, -- unique identifier for...
[ { "role": "user", "content": "Show all token symbols along with the names of any other tokens on the same contract address.", "sql": null }, { "role": "assistant", "content": "SELECT t1.token_symbol, t2.token_name AS other_token_name, t1.contract_address\nFROM web3.tokens t1\nJOIN web3.token...
You are an expert in writing database language. You can write a corresponding 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 all posts created by user 'U789'.", "sql": null }, { "role": "assistant", "content": "SELECT post_id, content, created_at, media_type FROM social_media.posts WHERE user_id = 'U789'", "sql": null }, { "role": "user", "content": "Only show me ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE erc1155_approval_for_all ( block_number bigint NOT NULL, -- Block number contain...
[ { "role": "user", "content": "For each Bitcoin token tick, find the wallet address holding the largest amount and include the creator from token_info_bitcoin.", "sql": null }, { "role": "assistant", "content": "SELECT b.tick,\n b.wallet_address,\n CAST(b.amount AS DECIMAL) AS max...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id text, property_name text, address_li...
[ { "role": "user", "content": "List all guests who live in 'Canada' with their first and last name, and email address.", "sql": null }, { "role": "assistant", "content": "SELECT first_name, last_name, email \nFROM hospitality_technology.guests \nWHERE country_code = 'CAN';", "sql": null ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.policies ( policy_id character varying(64) NOT NULL, customer_id character...
[ { "role": "user", "content": "List customers who have both a canceled policy and an active policy. Show customer_id, canceled_policy_id, and active_policy_id.", "sql": null }, { "role": "assistant", "content": "SELECT p1.customer_id,\n p1.policy_id AS canceled_policy_id,\n p2.pol...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.citizens ( citizen_id character varying(64) NOT NULL, -- un...
[ { "role": "user", "content": "List the first name, last name, and job title for all employees, along with the name of the agency they belong to.", "sql": null }, { "role": "assistant", "content": "SELECT T1.first_name, T1.last_name, T1.job_title, T2.agency_name FROM employees AS T1 JOIN agen...
You are an expert in writing database language. You can write a corresponding 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": "For each SUI coin type, show the total balance across all owners and the number of distinct owners.", "sql": null }, { "role": "assistant", "content": "SELECT\n coin_type,\n SUM(CAST(balance AS DECIMAL)) AS total_balance,\n COUNT(DISTINCT owner) AS owner_coun...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.routes ( route_id text, route_number text, description text, origin_l...
[ { "role": "user", "content": "Show me a list of all bus routes, including their route numbers, type, and the names of both the origin and destination locations.", "sql": null }, { "role": "assistant", "content": "SELECT r.route_number, r.type, lo.name AS origin_name, ld.name AS destination_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 erc20_balances ( block_number.bigint, contract_address.text, wallet_address.text, am...
[ { "role": "user", "content": "I need to know the total USD value of all ERC-20 holdings by each wallet. Calculate the sum of (amount * price) using the latest token prices from token_prices_latest, grouped by wallet_address.", "sql": null }, { "role": "assistant", "content": "SELECT eb.walle...
You are an expert in writing database language. You can write a corresponding 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.payments ( payment_id text PRIMARY KEY, application_id text, cit...
[ { "role": "user", "content": "Show me all failed payments along with the application ID, citizen ID, and payment timestamp.", "sql": null }, { "role": "assistant", "content": "SELECT payment_id, application_id, citizen_id, payment_timestamp\nFROM government_services.payments\nWHERE 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 healthcare.appointments ( appointment_id text PRIMARY KEY, patient_id text, doctor_i...
[ { "role": "user", "content": "How many appointments are scheduled at each location?", "sql": null }, { "role": "assistant", "content": "SELECT location_id, COUNT(*) AS scheduled_count FROM healthcare.appointments WHERE status = 'scheduled' GROUP BY location_id;", "sql": null } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.prescriptions ( prescription_id text PRIMARY KEY, record_id text, patient...
[ { "role": "user", "content": "List all distinct medication IDs that have been prescribed with more than 5 refills allowed.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT medication_id FROM healthcare.prescriptions WHERE refills_allowed > 5;", "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.fuel_logs ( fuel_log_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "I need a summary of fueling events grouped by fuel_type: count of events and total quantity.", "sql": null }, { "role": "assistant", "content": "SELECT\n fuel_type,\n COUNT(*) AS event_count,\n SUM(quantity) AS total_quantity\nFROM transportation.fuel_logs\nG...
You are an expert in writing database language. You can write a corresponding 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": "Provide a list of all customers whose status is 'Active' and show their customer_id, full name, and email address.", "sql": null }, { "role": "assistant", "content": "SELECT customer_id, first_name || ' ' || last_name AS full_name, email\nFROM insurance.customer...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.utxos ( utxo_id character varying(64) NOT NULL, -- unique iden...
[ { "role": "user", "content": "Show all DApps that have metadata linked to an asset with a key of 'category', including the DApp name, URL, and the associated asset_id.", "sql": null }, { "role": "assistant", "content": "SELECT d.name, d.url, m.asset_id\nFROM trading_platform.dapps d\nJOIN tr...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.policies ( policy_id character varying(64) NOT NULL, -- unique identif...
[ { "role": "user", "content": "Find the total amount paid for all premium payments made in the last 30 days.", "sql": null }, { "role": "assistant", "content": "SELECT SUM(amount_paid) FROM insurance.premium_payments WHERE payment_date >= CURRENT_DATE - INTERVAL '30 day';", "sql": null ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birt...
[ { "role": "user", "content": "For each medical record, display the record date, doctor full name, and medication name for any prescription linked to that record.", "sql": null }, { "role": "assistant", "content": "SELECT mr.record_date, d.first_name || ' ' || d.last_name AS doctor_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 hospitality_technology.rooms ( room_id text, property_id text, room_number text, roo...
[ { "role": "user", "content": "List all guests who have reservations for rooms that are currently marked as 'Maintenance'. Include the guest's full name, room number, and the reservation check-in and check-out dates.", "sql": null }, { "role": "assistant", "content": "SELECT g.first_name || '...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.services ( service_id character varying(64) NOT NULL, -- ...
[ { "role": "user", "content": "List all food and beverage services (category = 'Food & Beverage') with their names, prices, and units, where the price is less than $20.", "sql": null }, { "role": "assistant", "content": "SELECT service_name, price, unit FROM hospitality_technology.services WH...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.comments ( comment_id character varying(64) NOT NULL, -- unique ide...
[ { "role": "user", "content": "List the conversation IDs and user IDs for participants who have email notifications enabled.", "sql": null }, { "role": "assistant", "content": "SELECT cp.conversation_id, cp.user_id FROM social_media.conversation_participants AS cp JOIN social_media.user_setti...
You are an expert in writing database language. You can write a corresponding 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": "For each player and game, how many achievements has the player unlocked? Display the player's username, the game title, and the number of achievements unlocked.", "sql": null }, { "role": "assistant", "content": "SELECT p.username, g.title, COUNT(pa.player_achie...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE blockchain.wallets ( wallet_id character varying(64) NOT NULL, -- unique identi...
[ { "role": "user", "content": "Find all users who have wallets with private keys containing the substring 'abc'.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT user_id FROM blockchain.wallets WHERE private_key LIKE '%abc%';", "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.users ( user_id text, username text, email text, password_hash text, fu...
[ { "role": "user", "content": "Retrieve the usernames and email addresses of users who updated their profiles in the last 30 days.", "sql": null }, { "role": "assistant", "content": "SELECT username, email\nFROM social_media.users\nWHERE updated_at >= NOW() - INTERVAL '30 days';", "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.invoices ( invoice_id character varying(64) NOT NULL, -- unique ...
[ { "role": "user", "content": "I want to see a list of invoice_number and appointment_id for each invoice that has a scheduled appointment.", "sql": null }, { "role": "assistant", "content": "SELECT i.invoice_number,\n a.appointment_id\nFROM legal_services.invoices i\nJOIN legal_service...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.clients ( client_id text, first_name text, last_name text, company_na...
[ { "role": "user", "content": "How many clients registered in each month of 2024? Provide the month (YYYY-MM) and the number of registrations.", "sql": null }, { "role": "assistant", "content": "SELECT TO_CHAR(date_registered, 'YYYY-MM') AS month, COUNT(*) AS registration_count FROM legal_ser...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE blockchain.nodes ( node_id text PRIMARY KEY, ip_address text, port int, last_seen ti...
[ { "role": "user", "content": "Find all pairs of nodes that share the same ip_address but have different port numbers, include both node IDs, their ports, and the ip_address.", "sql": null }, { "role": "assistant", "content": "SELECT n1.node_id AS node1_id, n2.node_id AS node2_id, n1.ip_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 hospitality_technology.properties ( property_id character varying(64) NOT NULL, ...
[ { "role": "user", "content": "Get the average overall review rating for each property. Return property_name and avg_rating.", "sql": null }, { "role": "assistant", "content": "SELECT pr.property_name, AVG(r.rating_overall) AS avg_rating\nFROM hospitality_technology.reviews r\nJOIN hospitalit...
You are an expert in writing database language. You can write a corresponding 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.text, route_id.text, vehicle_id.text, driver_id.text,...
[ { "role": "user", "content": "Show me all cancelled trips along with their scheduled departure times and route IDs.", "sql": null }, { "role": "assistant", "content": "SELECT trip_id, route_id, scheduled_departure FROM transportation.trips WHERE status = 'cancelled';", "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": "I’d like to find all pairs of securities that belong to the same sector.", "sql": null }, { "role": "assistant", "content": "SELECT a.security_id, a.ticker_symbol, b.security_id AS pair_security_id, b.ticker_symbol AS pair_ticker_symbol, a.sector\nFROM financial...
You are an expert in writing database language. You can write a corresponding 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": "Find the deployer address that has deployed the highest number of contracts and report the address and the total count of contracts for that deployer.", "sql": null }, { "role": "assistant", "content": "SELECT deployer_address, COUNT(*) AS contract_count FROM we...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.wallets ( wallet_id.text, user_id.text, address.text, private_key.t...
[ { "role": "user", "content": "List pairs of wallets created on the same day but belonging to different users. Show the wallet IDs, user IDs, and creation dates for both wallets in each pair.", "sql": null }, { "role": "assistant", "content": "SELECT w1.wallet_id AS wallet1_id, w1.user_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 token_metas ( block_timestamp.timestamp, block_number.bigint, transaction_hash.text,...
[ { "role": "user", "content": "For each contract address and contract type in the `nft_holders` table, count the number of distinct `token_id`s.", "sql": null }, { "role": "assistant", "content": "SELECT contract_address, contract_type, COUNT(DISTINCT token_id) AS distinct_token_count FROM nf...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id text PRIMARY KEY, property_name text...
[ { "role": "user", "content": "List all reviews for properties with a star rating of at least 4.5. Include the property_name, review_id, rating_overall, and review_date.", "sql": null }, { "role": "assistant", "content": "SELECT p.property_name, r.review_id, r.rating_overall, r.review_date\nF...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.post_hashtags ( post_hashtag_id text, post_id text, hashtag_id text ) C...
[ { "role": "user", "content": "Get all notifications for posts tagged with hashtag 'H123', showing notification_id and created_at.", "sql": null }, { "role": "assistant", "content": "SELECT n.notification_id, n.created_at\nFROM social_media.notifications n\nJOIN social_media.post_hashtags ph\...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.game_sessions ( session_id.uuid, player_id.uuid, game_id.uuid, ser...
[ { "role": "user", "content": "Show me the total number of sessions and the total duration in seconds for each server, including the server name and the game title.", "sql": null }, { "role": "assistant", "content": "SELECT\n s.server_name,\n g.game_title,\n COUNT(gs.session_id) AS total_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 financial_services.customers ( customer_id character varying(64) NOT NULL, first_nam...
[ { "role": "user", "content": "List each employee and their manager's full name, showing employee_id, employee full name, and manager full name.", "sql": null }, { "role": "assistant", "content": "SELECT\n e.employee_id,\n e.first_name || ' ' || e.last_name AS employee_name,\n m.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 social_media.users ( user_id text, username text, email text, password_hash text, fu...
[ { "role": "user", "content": "List the usernames and email addresses of users who have published posts with media_type 'video', along with the creation time of each post.", "sql": null }, { "role": "assistant", "content": "SELECT u.username, u.email, p.created_at\nFROM social_media.users u\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 web3.wallets ( wallet_id.text, user_id.text, address.text, private_key.text, created...
[ { "role": "user", "content": "List the wallet IDs and creation timestamps for all wallets created after '2023-01-01'.", "sql": null }, { "role": "assistant", "content": "SELECT wallet_id, created_at FROM web3.wallets WHERE created_at > '2023-01-01';", "sql": null }, { "role": "us...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE narrative_info ( narrative character varying(512) NOT NULL, top_3_coins text, price_...
[ { "role": "user", "content": "Show the top 5 narratives by 24 hour trading volume. Include the narrative name and volume.", "sql": null }, { "role": "assistant", "content": "SELECT narrative, volume_24h FROM narrative_info ORDER BY volume_24h DESC LIMIT 5;", "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 web3.contracts ( contract_id.text, address.text, abi.text, bytecode.text, deployer_a...
[ { "role": "user", "content": "List all pairs of contracts deployed on the same network on the same day, showing network_id, the date, and the two contract IDs.", "sql": null }, { "role": "assistant", "content": "SELECT c1.network_id,\n DATE(c1.deployed_at) AS deploy_date,\n c1.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 smart_money_token_inflow ( token_address text, token_symbol text, token_amount numer...
[ { "role": "user", "content": "Which chain has the highest total USD inflow from buy transactions (type=1), and how many distinct tokens were involved in that inflow?", "sql": null }, { "role": "assistant", "content": "SELECT chain, SUM(usd_value) AS total_inflow, COUNT(DISTINCT token_symbol)...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.likes ( like_id.text, user_id.text, post_id.text, comment_id.text, crea...
[ { "role": "user", "content": "Count the total number of likes each post has received.", "sql": null }, { "role": "assistant", "content": "SELECT post_id, COUNT(*) AS like_count\nFROM social_media.likes\nWHERE post_id IS NOT NULL\nGROUP BY post_id;", "sql": null } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE 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 financial_services.customers ( customer_id text, first_name text, last_name text, da...
[ { "role": "user", "content": "List all customers who share an address with another customer. Show both customer IDs, their full names, and the shared address.", "sql": null }, { "role": "assistant", "content": "SELECT a.customer_id AS customer_id_a, a.first_name AS first_name_a, a.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 trading_platform.wallets ( wallet_id text, user_id text, address text, private_key t...
[ { "role": "user", "content": "List user IDs with approved KYC status and the addresses of their wallets.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT w.user_id, w.address FROM trading_platform.wallets w JOIN trading_platform.kyc_audit k ON w.user_id = k.user_id WHERE k...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.likes ( like_id character varying(64) NOT NULL, -- unique identifie...
[ { "role": "user", "content": "Which users have received both a comment notification and a like notification? List the recipient_user_id and the total number of such users.", "sql": null }, { "role": "assistant", "content": "SELECT COUNT(DISTINCT recipient_user_id) AS user_count\nFROM (\n 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 healthcare.appointments ( appointment_id text PRIMARY KEY, patient_id text, doctor_i...
[ { "role": "user", "content": "Can you provide a list of patients, their appointment times, and the generic names of any medications they were prescribed on the same day as the appointment?", "sql": null }, { "role": "assistant", "content": "SELECT a.patient_id, a.appointment_time, m.generic_...
You are an expert in writing database language. You can write a corresponding 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.tokens ( token_id character varying(64) NOT NULL, -- unique identifier for...
[ { "role": "user", "content": "List all pairs of tokens that are deployed on the same contract address and have the same number of decimals. Show both token IDs, the shared contract_address, and the decimals value.", "sql": null }, { "role": "assistant", "content": "SELECT t1.token_id AS toke...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.agencies ( agency_id character varying(64) NOT NULL, agency_name...
[ { "role": "user", "content": "List the first name, last name, job title of all employees who are currently employed, along with the name of the agency they work for.", "sql": null }, { "role": "assistant", "content": "SELECT e.first_name, e.last_name, e.job_title, a.agency_name FROM governme...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.rooms ( room_id.text, property_id.text, room_number.text, roo...
[ { "role": "user", "content": "List pairs of smoking and non-smoking rooms on the same floor for each property, showing the property_id, floor, smoking room_number, and non_smoking room_number.", "sql": null }, { "role": "assistant", "content": "SELECT r1.property_id,\n r1.floor,\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 text, property_name text, address_li...
[ { "role": "user", "content": "Show all rooms that are on floor 3.", "sql": null }, { "role": "assistant", "content": "SELECT room_id, property_id, room_number FROM hospitality_technology.rooms WHERE floor = 3;", "sql": null }, { "role": "user", "content": "For these rooms, in...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.wallets ( wallet_id character varying(64) NOT NULL, user_id charact...
[ { "role": "user", "content": "Show me, for each wallet address, the total sum of amounts for all unspent UTXOs, along with the user ID who owns the wallet.", "sql": null }, { "role": "assistant", "content": "SELECT w.address, w.user_id, COALESCE(SUM(u.amount), 0) AS total_unspent_amount\nFRO...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.users ( user_id character varying(64) NOT NULL, -- unique iden...
[ { "role": "user", "content": "Show me all users whose email address contains the word 'test', along with their user IDs and the date they registered.", "sql": null }, { "role": "assistant", "content": "SELECT user_id, username, email, created_at FROM trading_platform.users WHERE email ILIKE ...
You are an expert in writing database language. You can write a corresponding 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": "Show prescriptions with their corresponding chief complaint from the medical record. Return prescription_id, record_id, and chief_complaint.", "sql": null }, { "role": "assistant", "content": "SELECT p.prescription_id, p.record_id, mr.chief_complaint\nFROM healt...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.players ( player_id uuid PRIMARY KEY, username text, email text, p...
[ { "role": "user", "content": "For each in-game item type, display the item type, total quantity held by players, and the average cost amount of those items.", "sql": null }, { "role": "assistant", "content": "SELECT i.item_type,\n COALESCE(SUM(pi.quantity), 0) AS total_quantity,\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.claim_documents ( document_id text, claim_id text, document_type text, fil...
[ { "role": "user", "content": "I want to find all claim IDs that have both an 'Accident Report' and a 'Police Report' document.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT a.claim_id\nFROM insurance.claim_documents a\nJOIN insurance.claim_documents b\n ON a.claim_id =...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.orders ( order_id.text, user_id.text, wallet_id.text, asset_id.text...
[ { "role": "user", "content": "For each user, calculate the total value of 'buy' and 'sell' orders (quantity * price).", "sql": null }, { "role": "assistant", "content": "SELECT b.user_id,\n b.total_buy_value,\n s.total_sell_value\nFROM (\n SELECT user_id,\n SUM(quantity ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.documents ( document_id text PRIMARY KEY, application_id text, c...
[ { "role": "user", "content": "Can you list pairs of documents uploaded by the same citizen? Show both document IDs and the citizen ID.", "sql": null }, { "role": "assistant", "content": "SELECT d1.document_id AS document1, d2.document_id AS document2, d1.citizen_id\nFROM government_services....
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.routes ( route_id.text, route_number.text, description.text, origin_l...
[ { "role": "user", "content": "Find all pairs of distinct routes that share the same origin location ID. List the route IDs and route numbers for both routes in each pair, along with the shared origin location ID.", "sql": null }, { "role": "assistant", "content": "SELECT r1.route_id AS route...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE token_metas ( block_timestamp timestamp(6) NOT NULL, block_number bigint NOT NULL, t...
[ { "role": "user", "content": "For each ERC1155 contract in erc1155_approval_for_all, show contract_address, the count of approval-for-all events, and the number of unique current holders from nft_holders. Order by holder_count descending and limit to 5.", "sql": null }, { "role": "assistant", ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.clients ( client_id character varying(64) NOT NULL, first_name charac...
[ { "role": "user", "content": "Give me the count of clients who registered in each month of 2023.", "sql": null }, { "role": "assistant", "content": "SELECT TO_CHAR(date_registered, 'YYYY-MM') AS reg_month, COUNT(*) AS client_count FROM legal_services.clients WHERE date_registered BETWEEN '20...
You are an expert in writing database language. You can write a corresponding 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.blocks ( block_id text PRIMARY KEY, previous_block_id text, timestamp tim...
[ { "role": "user", "content": "Show me all smart contracts along with the email address of the user who owns the wallet corresponding to the contract's creator address.", "sql": null }, { "role": "assistant", "content": "SELECT sc.contract_id, sc.creator_address, u.email\nFROM blockchain.smar...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.players ( player_id uuid PRIMARY KEY, username text, email text, p...
[ { "role": "user", "content": "Show me each achievement name and the number of players who have unlocked it.", "sql": null }, { "role": "assistant", "content": "SELECT a.name,\n COUNT(pa.player_id) AS unlock_count\nFROM gaming_technology.achievements a\nLEFT JOIN gaming_technology.playe...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id character varying(64) NOT NULL, prop...
[ { "role": "user", "content": "List all guests who have made a reservation for a room type with a base rate over 300, showing their first name, last name, the property name, and the room type name.", "sql": null }, { "role": "assistant", "content": "SELECT T1.first_name, T1.last_name, T4.prop...
You are an expert in writing database language. You can write a corresponding 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": "Find all pairs of achievement unlocks and item acquisitions by the same player where the item was acquired after the achievement was unlocked. List player_id, achievement_id, unlocked_at, item_id, and acquired_at.", "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 insurance.policy_beneficiaries ( beneficiary_id text, policy_id text, customer_id te...
[ { "role": "user", "content": "List all beneficiaries added in the last 6 months, showing their full names and relationship to the policyholder.", "sql": null }, { "role": "assistant", "content": "SELECT first_name, last_name, relationship FROM insurance.policy_beneficiaries WHERE added_at >=...
You are an expert in writing database language. You can write a corresponding 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": "How many players are there for each status in the players table?", "sql": null }, { "role": "assistant", "content": "SELECT status, COUNT(*) AS player_count\nFROM gaming_technology.players\nGROUP BY status;", "sql": null }, { "role": "user", "con...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id character varying(64) NOT NULL, ...
[ { "role": "user", "content": "Retrieve the property name, review source, and review date for all reviews.", "sql": null }, { "role": "assistant", "content": "SELECT T1.property_name , T2.review_source , T2.review_date FROM hospitality_technology.properties AS T1 JOIN hospitality_technology...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.locations ( location_id.text, name.text, type.text, address_line1.tex...
[ { "role": "user", "content": "List all locations located in the state of 'Florida'.", "sql": null }, { "role": "assistant", "content": "SELECT * FROM transportation.locations WHERE state_province = 'Florida';", "sql": null }, { "role": "user", "content": "Can you only show lo...
You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, first_name character var...
[ { "role": "user", "content": "List all agents who have been terminated, showing their full name, agency name, and termination date.", "sql": null }, { "role": "assistant", "content": "SELECT first_name, last_name, agency_name, termination_date\nFROM insurance.agents\nWHERE status <> 'Active'...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.drivers ( driver_id.text, employee_id.text, first_name.text, last_nam...
[ { "role": "user", "content": "List each driver along with the driver_id of the driver who was hired immediately after them.", "sql": null }, { "role": "assistant", "content": "SELECT d1.driver_id AS current_driver_id, d2.driver_id AS next_driver_id FROM transportation.drivers d1 LEFT JOIN tr...