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 insurance.policies ( policy_id text, customer_id text, product_id text, agent_id tex...
[ { "role": "user", "content": "Show policy numbers and product names for all policies that started in 2023.", "sql": null }, { "role": "assistant", "content": "SELECT p.policy_number, ip.product_name FROM insurance.policies AS p JOIN insurance.insurance_products AS ip ON p.product_id = ip.pro...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.insurance_products ( product_id.text, product_name.text, product_type.text...
[ { "role": "user", "content": "List the first name and last name of all policy beneficiaries, along with the name of the insurance product associated with their policy.", "sql": null }, { "role": "assistant", "content": "SELECT T1.first_name, T1.last_name, T2.product_name FROM insurance.polic...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id character varying(64) NOT NULL, -- unique ...
[ { "role": "user", "content": "Show the most recent maintenance service for each vehicle, including the vehicle's make and model.", "sql": null }, { "role": "assistant", "content": "SELECT m.vehicle_id, v.make, v.model, m.service_date, m.service_type, m.odometer_reading\nFROM transportation.m...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.insurance_plans ( plan_id.text, plan_name.text, insurance_provider.text, ...
[ { "role": "user", "content": "I want to list pairs of insurance plans from the same provider, showing both plan IDs and names alongside the provider.", "sql": null }, { "role": "assistant", "content": "SELECT p1.plan_id, p1.plan_name, p2.plan_id AS plan_id_2, p2.plan_name AS plan_name_2, p1....
You are an expert in writing database language. You can write a corresponding 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 each player and the total number of game sessions they have participated in.", "sql": null }, { "role": "assistant", "content": "SELECT T1.player_id, T1.username, count(T2.session_id) FROM gaming_technology.players AS T1 LEFT JOIN gaming_technology.game_ses...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.services ( service_id.text, agency_id.text, service_name.text, d...
[ { "role": "user", "content": "Can you show me a list of all active services along with their agency IDs and categories?", "sql": null }, { "role": "assistant", "content": "SELECT service_id, agency_id, service_name, category FROM government_services.services WHERE is_active = TRUE;", "sq...
You are an expert in writing database language. You can write a corresponding 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": "Show the total number of maintenance logs for each vehicle along with the vehicle's make and model.", "sql": null }, { "role": "assistant", "content": "SELECT v.vehicle_id, v.make, v.model, COUNT(m.log_id) AS maintenance_count\nFROM transportation.vehicles v\nLE...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.servers ( server_id uuid PRIMARY KEY, game_id uuid, server_name te...
[ { "role": "user", "content": "Show me all servers that are currently full, meaning current players equals max players. List the server name, region, and max players.", "sql": null }, { "role": "assistant", "content": "SELECT server_name, region, max_players FROM gaming_technology.servers WHE...
You are an expert in writing database language. You can write a corresponding 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.text, token_name.text, token_symbol.text, chain.te...
[ { "role": "user", "content": "List all tokens on the BSC chain with a price below $1.", "sql": null }, { "role": "assistant", "content": "SELECT token_symbol, token_name, price FROM token_dexpool_info WHERE chain = 'BSC' AND price < 1;", "sql": null }, { "role": "user", "cont...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.employees ( employee_id character varying(64) NOT NULL, -- u...
[ { "role": "user", "content": "List all distinct job titles present in the organization.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT job_title FROM government_services.employees;", "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 erc1155_approval_for_all ( block_number bigint NOT NULL, block_timestamp timestamp(3...
[ { "role": "user", "content": "List all wallets holding the NFT with contract_address '0xabc123' and token_id '100' and the amount held.", "sql": null }, { "role": "assistant", "content": "SELECT wallet_address, amount\nFROM nft_holders\nWHERE contract_address = '0xabc123'\n AND token_id = '...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.customers ( customer_id text PRIMARY KEY, first_name text, last_name text,...
[ { "role": "user", "content": "Show the first name and last name of customers along with the payment method for all their premium payments.", "sql": null }, { "role": "assistant", "content": "SELECT T1.first_name, T1.last_name, T2.payment_method FROM insurance.customers AS T1 JOIN insurance.p...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.users ( user_id.text, username.text, email.text, password_hash.text...
[ { "role": "user", "content": "Show each user's username and the total number of notifications they have received.", "sql": null }, { "role": "assistant", "content": "SELECT T1.username, count(T2.notification_id) FROM users AS T1 LEFT JOIN notifications AS T2 ON T1.user_id = T2.user_id GROUP ...
You are an expert in writing database language. You can write a corresponding 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": "Please provide each follow relationship, including the follower's username, the followed user's username, and the follow creation timestamp.", "sql": null }, { "role": "assistant", "content": "SELECT\n u1.username AS follower_username,\n u2.username AS followi...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id text PRIMARY KEY, license_plate text, vin text,...
[ { "role": "user", "content": "Find vehicles whose capacity is greater than the average capacity for their type. Show the vehicle_id, type, and capacity.", "sql": null }, { "role": "assistant", "content": "SELECT v.vehicle_id, v.type, v.capacity FROM transportation.vehicles v JOIN (SELECT typ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id character varying(64) NOT NULL, -- unique ...
[ { "role": "user", "content": "Provide a summary showing, for each vehicle type, the total number of fueling events and the combined total fuel quantity refueled.", "sql": null }, { "role": "assistant", "content": "SELECT v.type AS vehicle_type, COUNT(f.fuel_log_id) AS total_fueling_events, S...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id character varying(64) NOT NULL, license_plate c...
[ { "role": "user", "content": "Show me all active electric vehicles along with their make, model, and license plate, ordered by acquisition date with the newest first.", "sql": null }, { "role": "assistant", "content": "SELECT vehicle_id, make, model, license_plate, acquisition_date FROM 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 legal_services.invoices ( invoice_id.text, invoice_number.text, client_id.text, case...
[ { "role": "user", "content": "For each client, list their first and last invoice numbers along with the corresponding issue_dates.", "sql": null }, { "role": "assistant", "content": "SELECT first_inv.client_id,\n first_inv.invoice_number AS first_invoice,\n first_inv.issue_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.users ( user_id text, username text, email text, password_hash text, fu...
[ { "role": "user", "content": "List group conversation names and the number of messages sent in each conversation after January 1, 2023.", "sql": null }, { "role": "assistant", "content": "SELECT c.group_name, COUNT(m.message_id) FROM social_media.conversations c JOIN social_media.messages 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.cases ( case_id text, case_number text, case_name text, client_id tex...
[ { "role": "user", "content": "Show me the case number, client ID, and total amount for each case that has at least one invoice.", "sql": null }, { "role": "assistant", "content": "SELECT c.case_number, c.client_id, SUM(i.total_amount) AS total_invoice_amount\nFROM legal_services.cases c\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 government_services.service_locations ( location_id.text, agency_id.text, location_n...
[ { "role": "user", "content": "List the location name and contact phone number for all service locations situated in the city of 'New York'.", "sql": null }, { "role": "assistant", "content": "SELECT location_name, contact_phone FROM government_services.service_locations WHERE city = 'New Yor...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.claims ( claim_id character varying(64) NOT NULL, policy_id character vary...
[ { "role": "user", "content": "List all claims that have at least one document of type 'INVOICE', including the claim ID, incident date, estimated loss, and the document's file name.", "sql": null }, { "role": "assistant", "content": "SELECT c.claim_id, c.incident_date, c.estimated_loss, d.fi...
You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, passenger_id ch...
[ { "role": "user", "content": "Show the total number of bookings made for each seat_number. Include only seat numbers which have more than one booking.", "sql": null }, { "role": "assistant", "content": "SELECT seat_number, COUNT(*) AS booking_count\nFROM transportation.bookings\nWHERE seat_n...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.players ( player_id uuid, username text, email text, password_hash...
[ { "role": "user", "content": "Show the usernames of players and a count of how many different item types they have in their inventory.", "sql": null }, { "role": "assistant", "content": "SELECT T1.username, count(DISTINCT T3.item_type) FROM gaming_technology.players AS T1 JOIN gaming_technol...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.citizens ( citizen_id character varying(64) NOT NULL, -- un...
[ { "role": "user", "content": "List the first name, last name, and date of birth for all citizens born before January 1, 1995.", "sql": null }, { "role": "assistant", "content": "SELECT first_name, last_name, date_of_birth FROM government_services.citizens WHERE date_of_birth < '1995-01-01';"...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.contracts ( contract_id character varying(64) NOT NULL, address character varyi...
[ { "role": "user", "content": "List each token_id and the number of transfers recorded for that token.", "sql": null }, { "role": "assistant", "content": "SELECT token_id, COUNT(*) AS transfer_count\nFROM web3.token_transfers\nGROUP BY token_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 gaming_technology.players ( player_id uuid, username text, email text, password_hash...
[ { "role": "user", "content": "Can you list each developer's name along with the number of games they have published by joining developers and games?", "sql": null }, { "role": "assistant", "content": "SELECT d.name AS developer_name,\n COUNT(g.game_id) AS games_published\nFROM gaming_t...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.payments ( payment_id character varying(64) NOT NULL, applicatio...
[ { "role": "user", "content": "For each payment method, show the total number of completed payments and the total amount paid.", "sql": null }, { "role": "assistant", "content": "SELECT payment_method, COUNT(*) AS completed_count, SUM(amount) AS total_paid FROM government_services.payments 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.users ( user_id text PRIMARY KEY, username text, email text, password_h...
[ { "role": "user", "content": "List each hashtag_id along with the total number of distinct posts it's linked to.", "sql": null }, { "role": "assistant", "content": "SELECT hashtag_id, COUNT(DISTINCT post_id) AS post_count\nFROM social_media.post_hashtags\nGROUP BY hashtag_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 government_services.services ( service_id text PRIMARY KEY, agency_id text, service_...
[ { "role": "user", "content": "Could you list pairs of services that belong to different agencies but share the same category? Provide the service names and their agency_ids.", "sql": null }, { "role": "assistant", "content": "SELECT s1.service_name AS service_name_1, s1.agency_id AS agency_i...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id character varying(64) NOT NULL, prop...
[ { "role": "user", "content": "List all rooms on the 5th floor for every property, showing room number and property name.", "sql": null }, { "role": "assistant", "content": "SELECT r.room_number, p.property_name\nFROM hospitality_technology.rooms r\nJOIN hospitality_technology.properties p ON...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE token_metas ( block_timestamp timestamp(6) NOT NULL, block_number bigint NOT NULL, t...
[ { "role": "user", "content": "For all NFT collections on the Ethereum blockchain, show me the collection name and the current floor price. Sort by floor price descending.", "sql": null }, { "role": "assistant", "content": "SELECT name, floor_price FROM nft_collections WHERE blockchain = 'Eth...
You are an expert in writing database language. You can write a corresponding 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": "List all policies that have been cancelled, showing the policy number, cancellation date, and reason.", "sql": null }, { "role": "assistant", "content": "SELECT policy_number, cancellation_date, cancellation_reason FROM insurance.policies WHERE status = 'Cancell...
You are an expert in writing database language. You can write a corresponding 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": "How many notifications have been marked as read so far?", "sql": null }, { "role": "assistant", "content": "SELECT COUNT(*) AS read_notifications_count\nFROM social_media.notifications\nWHERE read_at IS NOT NULL;", "sql": null } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id text PRIMARY KEY, license_plate text, vin text,...
[ { "role": "user", "content": "For all trips, show the trip ID, the route number, and the make and model of the vehicle used.", "sql": null }, { "role": "assistant", "content": "SELECT t.trip_id, r.route_number, v.make, v.model\nFROM transportation.fuel_logs t\nJOIN transportation.vehicles v ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE financial_services.accounts ( account_id text, customer_id text, account_number text...
[ { "role": "user", "content": "List each customer's account in one currency along with another account in a different currency, showing customer_id, account_primary, currency_primary, account_secondary, and currency_secondary.", "sql": null }, { "role": "assistant", "content": "SELECT a.custo...
You are an expert in writing database language. You can write a corresponding 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": "List all claim documents that do not have a description. Show the document_id, claim_id, file_name, and uploaded_at.", "sql": null }, { "role": "assistant", "content": "SELECT document_id, claim_id, file_name, uploaded_at FROM insurance.claim_documents WHERE 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 hospitality_technology.rooms ( room_id text, property_id text, room_number text, roo...
[ { "role": "user", "content": "Show reviews with an overall rating of 5, including the guest's full name and the property ID.", "sql": null }, { "role": "assistant", "content": "SELECT T1.first_name, T1.last_name, T2.property_id FROM hospitality_technology.guests AS T1 JOIN hospitality_techno...
You are an expert in writing database language. You can write a corresponding 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": "List all unread notifications for group conversations, including the conversation name, sender_user_id, and notification creation time.", "sql": null }, { "role": "assistant", "content": "SELECT c.group_name, n.sender_user_id, n.created_at\nFROM social_media.not...
You are an expert in writing database language. You can write a corresponding 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": "Compute the average and maximum cost of maintenance for each service_type in the maintenance_logs table.", "sql": null }, { "role": "assistant", "content": "SELECT service_type,\n AVG(cost) AS avg_cost,\n MAX(cost) AS max_cost\nFROM transportation.ma...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id.text, license_plate.text, vin.text, make.text, ...
[ { "role": "user", "content": "For each vehicle, find the vehicle acquired immediately before it in the same depot. Show current vehicle_id, acquisition_date, previous_vehicle_id, and previous_acquisition_date.", "sql": null }, { "role": "assistant", "content": "SELECT v.vehicle_id,\n v...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE financial_services.accounts ( account_id text, customer_id text, account_number text...
[ { "role": "user", "content": "List all accounts for customers who have at least one account with a balance over 10000 and another account with a balance under 1000. Show customer_id, account_id, account_type, balance, and currency.", "sql": null }, { "role": "assistant", "content": "SELECT 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 web3.users ( user_id text PRIMARY KEY, username text, email text, password_hash text...
[ { "role": "user", "content": "Show me all users whose username contains 'dev', including their user_id and email address.", "sql": null }, { "role": "assistant", "content": "SELECT user_id, username, email FROM web3.users WHERE username ILIKE '%dev%';", "sql": null }, { "role": "...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id text, property_name text, address_li...
[ { "role": "user", "content": "What is the count of payments for each currency code and the total amount paid in each currency?", "sql": null }, { "role": "assistant", "content": "SELECT\n currency_code,\n COUNT(payment_id) AS payment_count,\n SUM(amount) AS total_amount\nFROM hospitality_...
You are an expert in writing database language. You can write a corresponding 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": "Show me the number of fuel logs per location, including the location name and city.", "sql": null }, { "role": "assistant", "content": "SELECT fl.location_id, loc.name AS location_name, loc.city, COUNT(*) AS fuel_log_count\nFROM transportation.fuel_logs fl\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 trading_platform.users ( user_id character varying(64) NOT NULL, -- unique iden...
[ { "role": "user", "content": "Calculate the average quantity for orders based on their status.", "sql": null }, { "role": "assistant", "content": "SELECT status, AVG(quantity) FROM trading_platform.orders GROUP BY status;", "sql": null } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.in_game_items ( item_id uuid NOT NULL DEFAULT gen_random_uuid(), g...
[ { "role": "user", "content": "Provide each game_id with the item_name of its cheapest item and its most expensive item.", "sql": null }, { "role": "assistant", "content": "SELECT min_items.game_id,\n min_items.item_name AS cheapest_item,\n max_items.item_name AS most_expensive_it...
You are an expert in writing database language. You can write a corresponding 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.kyc_audit ( kyc_audit_id character varying(64) NOT NULL, -- un...
[ { "role": "user", "content": "Show me the top 5 users with the most KYC audits, along with their latest audit status.", "sql": null }, { "role": "assistant", "content": "SELECT user_id, status, COUNT(*) as audit_count FROM trading_platform.kyc_audit GROUP BY user_id, status ORDER BY audit_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 web3.wallets ( wallet_id text PRIMARY KEY, user_id text, address text, private_key t...
[ { "role": "user", "content": "List all pairs of wallets with the same creation timestamp but different wallet addresses, including both wallet_ids and the creation timestamp.", "sql": null }, { "role": "assistant", "content": "SELECT w1.wallet_id AS wallet_id_1, w2.wallet_id AS wallet_id_2, ...
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, route_number text, description te...
[ { "role": "user", "content": "Identify pairs of routes that share the same origin and destination but have different route_ids.", "sql": null }, { "role": "assistant", "content": "SELECT r1.route_id AS route_a, r2.route_id AS route_b, r1.origin_location_id, r1.destination_location_id FROM 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 hospitality_technology.service_orders ( order_id text PRIMARY KEY, reservation_id te...
[ { "role": "user", "content": "List all service orders with quantity greater than 3, showing the order ID, total price, and the staff member who placed the order.", "sql": null }, { "role": "assistant", "content": "SELECT order_id, total_price, staff_id_ordered\nFROM hospitality_technology.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.diagnoses ( diagnosis_id text PRIMARY KEY, record_id text, patient_id tex...
[ { "role": "user", "content": "Show me a list of prescriptions, including the prescription ID, medication ID, and start date, for prescriptions linked to any diagnosis that is marked as chronic.", "sql": null }, { "role": "assistant", "content": "SELECT T1.prescription_id, T1.medication_id, 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 gaming_technology.game_sessions ( session_id.uuid, player_id.uuid, game_id.uuid, ser...
[ { "role": "user", "content": "How many servers are in each region, and what's the average number of current players for those servers?", "sql": null }, { "role": "assistant", "content": "SELECT\n region,\n COUNT(server_id) AS server_count,\n AVG(current_players) AS average_current_players...
You are an expert in writing database language. You can write a corresponding 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, vehicle_id ch...
[ { "role": "user", "content": "List consecutive fuel log entries for each vehicle based on log_timestamp. Show vehicle ID, current log ID, previous log ID, current timestamp, previous timestamp, and the quantity difference (current - previous).", "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 token_metas ( block_timestamp timestamp(6) NOT NULL, block_number bigint NOT NULL, t...
[ { "role": "user", "content": "List all wallet addresses holding NFTs for contract address '0xabcdef...'. Show the wallet address and amount held.", "sql": null }, { "role": "assistant", "content": "SELECT wallet_address, amount, token_id FROM nft_holders WHERE contract_address = '0xabcdef......
You are an expert in writing database language. You can write a corresponding 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": "Could you list each player's username and the total number of sessions they have played?", "sql": null }, { "role": "assistant", "content": "SELECT p.username, COUNT(gs.session_id) AS total_sessions\nFROM gaming_technology.players p\nLEFT JOIN gaming_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 social_media.users ( user_id text PRIMARY KEY, username text, email text, password_h...
[ { "role": "user", "content": "Show the username, full name, and location for all users who registered before January 1, 2024 and are not verified.", "sql": null }, { "role": "assistant", "content": "SELECT username, full_name, location FROM social_media.users WHERE created_at < '2024-01-01' ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.locations ( location_id.text, name.text, type.text, address_line1.tex...
[ { "role": "user", "content": "How many locations are there in each city?", "sql": null }, { "role": "assistant", "content": "SELECT\n city,\n COUNT(*)\nFROM transportation.locations\nGROUP BY\n city;", "sql": null }, { "role": "user", "content": "Filter this to only includ...
You are an expert in writing database language. You can write a corresponding 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": "Could you list the top 5 highest average session scores for each game, showing the game title, developer name, and the average score?", "sql": null }, { "role": "assistant", "content": "SELECT g.title AS game_title,\n d.name AS developer_name,\n AVG(...
You are an expert in writing database language. You can write a corresponding 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": "How many contracts are deployed each month for each status?", "sql": null }, { "role": "assistant", "content": "SELECT TO_CHAR(deployed_at, 'YYYY-MM') AS deploy_month,\n status,\n COUNT(*) AS contract_count\nFROM web3.contracts\nGROUP BY TO_CHAR(depl...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.clients ( client_id character varying(64) NOT NULL, first_name charac...
[ { "role": "user", "content": "Show me the first and last names of clients along with the first and last names of their lead lawyers for all open cases.", "sql": null }, { "role": "assistant", "content": "SELECT c.first_name AS client_first, c.last_name AS client_last, l.first_name AS lawyer_...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id character varying(64) NOT NULL, prop...
[ { "role": "user", "content": "For each department, list the total number of available services and the total combined price of those services.", "sql": null }, { "role": "assistant", "content": "SELECT department, COUNT(*) AS service_count, SUM(price) AS total_price\nFROM hospitality_technol...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.rooms ( room_id.text, property_id.text, room_number.text, roo...
[ { "role": "user", "content": "I need the full names of guests who have checked out in June 2023. Show reservation_id, guest first and last name, property_id and actual_check_out_ts.", "sql": null }, { "role": "assistant", "content": "SELECT r.reservation_id, g.first_name || ' ' || g.last_nam...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id character varying(64) NOT NULL, ...
[ { "role": "user", "content": "Show all payments made for reservations that had more than 2 adults. Include the payment ID, amount, currency, reservation ID, guest full name, and the number of adults in the reservation.", "sql": null }, { "role": "assistant", "content": "SELECT T1.payment_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.room_types ( room_type_id text PRIMARY KEY, property_id text,...
[ { "role": "user", "content": "Which bed types are offered in each property and how many different room types are associated with each bed type?", "sql": null }, { "role": "assistant", "content": "SELECT property_id, bed_type, COUNT(DISTINCT room_type_id) AS room_type_count FROM hospitality_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 insurance.customers ( customer_id character varying(64) NOT NULL, first_name charact...
[ { "role": "user", "content": "List policy number, start date, premium amount, and the agent's first and last name for all policies sold by agents licensed in 'NY'.", "sql": null }, { "role": "assistant", "content": "SELECT T1.policy_number, T1.start_date, T1.premium_amount, T2.first_name, T2...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id text, license_plate text, vin text, make text, ...
[ { "role": "user", "content": "List the vehicle_id, make, model, and acquisition_date for all active vehicles acquired after '2022-01-01'.", "sql": null }, { "role": "assistant", "content": "SELECT vehicle_id, make, model, acquisition_date\nFROM transportation.vehicles\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 trading_platform.users ( user_id text PRIMARY KEY, username text, email text, passwo...
[ { "role": "user", "content": "List each wallet with its wallet_id, user_id, and the total amount of unspent UTXOs associated with that wallet.", "sql": null }, { "role": "assistant", "content": "SELECT\n w.wallet_id,\n w.user_id,\n COALESCE(SUM(u.amount), 0) AS unspent_total\nFROM trading...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.clients ( client_id text PRIMARY KEY, first_name text, last_name text...
[ { "role": "user", "content": "I want to retrieve each client's full name along with the subject and start time of their appointments.", "sql": null }, { "role": "assistant", "content": "SELECT c.first_name || ' ' || c.last_name AS client_name, a.subject, a.start_time\nFROM legal_services.cli...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE financial_services.accounts ( account_id character varying(64) NOT NULL, -- uniq...
[ { "role": "user", "content": "Summarize the accounts table by account type and currency, showing the average balance for each combination.", "sql": null }, { "role": "assistant", "content": "SELECT account_type, currency, AVG(balance) AS average_balance, COUNT(account_id) AS account_count FR...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.law_firms ( firm_id character varying(64) NOT NULL, firm_name charact...
[ { "role": "user", "content": "Show me the names of law firms and their associated open case numbers.", "sql": null }, { "role": "assistant", "content": "SELECT l.firm_name, c.case_number\nFROM legal_services.law_firms l\nJOIN legal_services.cases c\n ON l.managing_partner_id = c.lead_lawyer...
You are an expert in writing database language. You can write a corresponding 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": "Count the number of contracts for each network_id.", "sql": null }, { "role": "assistant", "content": "SELECT network_id, COUNT(*) FROM web3.contracts GROUP BY network_id;", "sql": null }, { "role": "user", "content": "Now, only show networks wit...
You are an expert in writing database language. You can write a corresponding 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.metadata ( metadata_id character varying(64) NOT NULL, asset_id cha...
[ { "role": "user", "content": "List asset_id, issuer and launch_date metadata values for each asset that has both 'issuer' and 'launch_date' keys.", "sql": null }, { "role": "assistant", "content": "SELECT m_iss.asset_id,\n m_iss.value AS issuer,\n m_ld.value AS launch_date\nFROM ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id character varying(64) NOT NULL, license_plate c...
[ { "role": "user", "content": "Which vehicles have a total maintenance cost exceeding 10000 across all their maintenance logs?", "sql": null }, { "role": "assistant", "content": "SELECT vehicle_id, SUM(cost) AS total_maintenance_cost FROM transportation.maintenance_logs GROUP BY vehicle_id HA...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.drivers ( driver_id text PRIMARY KEY, employee_id text, first_name te...
[ { "role": "user", "content": "List the first and last names of all drivers with status 'Active' along with the route number and type of all Express routes.", "sql": null }, { "role": "assistant", "content": "SELECT d.first_name, d.last_name, r.route_number, r.type\nFROM transportation.driver...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.routes ( route_id text PRIMARY KEY, route_number text, description te...
[ { "role": "user", "content": "Show me the trip_id, route_number, and scheduled_departure for all trips where the associated vehicle has a maintenance log indicating the next service is due before 2024-05-01.", "sql": null }, { "role": "assistant", "content": "SELECT t.trip_id, r.route_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 healthcare.patients ( patient_id character varying(64) NOT NULL, first_name characte...
[ { "role": "user", "content": "List the license number and specialty for all doctors who have a phone number on record.", "sql": null }, { "role": "assistant", "content": "SELECT license_number, specialty FROM healthcare.doctors WHERE phone_number IS NOT NULL;", "sql": null } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.employees ( employee_id text, agency_id text, first_name text, l...
[ { "role": "user", "content": "Can you show the number of employees working for each agency and the number of service locations each agency has?", "sql": null }, { "role": "assistant", "content": "SELECT e.agency_id, COUNT(DISTINCT e.employee_id) AS employee_count, COUNT(DISTINCT sl.location_...
You are an expert in writing database language. You can write a corresponding 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, user_id character var...
[ { "role": "user", "content": "Show each user_id along with the total number of wallets they own.", "sql": null }, { "role": "assistant", "content": "SELECT user_id, COUNT(*) AS wallet_count\nFROM blockchain.wallets\nGROUP BY user_id;", "sql": null }, { "role": "user", "conten...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE erc20_balances ( block_number bigint NOT NULL, contract_address varchar NOT NULL, wa...
[ { "role": "user", "content": "For each wallet that currently holds more than 5000 units of any ERC20 token, show the wallet address and contract address.", "sql": null }, { "role": "assistant", "content": "SELECT contract_address, wallet_address, CAST(amount AS numeric) AS amount\nFROM erc20...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.events ( event_id character varying(64) NOT NULL, contract_id character varying...
[ { "role": "user", "content": "List all token symbols and their total supply for tokens where the total supply is greater than the average total supply of all tokens.", "sql": null }, { "role": "assistant", "content": "SELECT token_symbol, total_supply FROM web3.tokens WHERE total_supply > (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 social_media.users ( user_id character varying(64) NOT NULL, username character vary...
[ { "role": "user", "content": "Show the usernames and email addresses of users who have commented on their own posts.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT u.username, u.email\nFROM social_media.comments c\nJOIN social_media.users u ON c.user_id = u.user_id\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 insurance.claim_documents ( document_id text PRIMARY KEY, claim_id text, document_ty...
[ { "role": "user", "content": "Show the top 5 largest documents by file size, including document_id, claim_id, file_name, and file_size_bytes.", "sql": null }, { "role": "assistant", "content": "SELECT document_id,\n claim_id,\n file_name,\n file_size_bytes\nFROM insurance.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 trading_platform.assets ( asset_id character varying(64) NOT NULL, -- unique id...
[ { "role": "user", "content": "Show the names, symbols, and types of all assets whose symbol starts with the letter 'B'.", "sql": null }, { "role": "assistant", "content": "SELECT name, symbol, type\nFROM trading_platform.assets\nWHERE symbol LIKE 'B%';", "sql": null } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE blockchain.wallets ( wallet_id.text, user_id.text, address_id.text, private_key.text...
[ { "role": "user", "content": "Show me the username and email of all users who own at least one wallet.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT T1.username, T1.email FROM blockchain.users AS T1 JOIN blockchain.wallets AS T2 ON T1.user_id = T2.user_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 government_services.agencies ( agency_id character varying(64) NOT NULL, -- uniq...
[ { "role": "user", "content": "Show me all document types that have been submitted by citizens to agencies with a jurisdiction level of 'Federal'. Also include the name of the agency.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT d.document_type, a.agency_name\nFROM gove...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.developers ( developer_id uuid PRIMARY KEY, name text, country tex...
[ { "role": "user", "content": "I want to see, for each game, the total number of sessions and the average cost of its in-game items.", "sql": null }, { "role": "assistant", "content": "SELECT gs.game_id, COUNT(*) AS session_count, AVG(igi.cost_amount) AS avg_item_cost FROM gaming_technology.g...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.citizens ( citizen_id character varying(64) NOT NULL, national_i...
[ { "role": "user", "content": "For each employee, retrieve their first and last name along with the number of appointments they've scheduled.", "sql": null }, { "role": "assistant", "content": "SELECT e.first_name, e.last_name, COUNT(a.appointment_id) AS appointment_count\nFROM government_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 healthcare.medical_records ( record_id text, patient_id text, appointment_id text, d...
[ { "role": "user", "content": "Show me pairs of patients who have had a medical record created on the same day. For each pair, include the first patient's ID, the second patient's ID, the shared record_date, and their respective record_ids.", "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 gaming_technology.player_inventory ( inventory_id uuid, player_id uuid, item_id uuid...
[ { "role": "user", "content": "Find players who acquired two different items within the same minute. List the player ID, and the inventory IDs of the two acquisitions.", "sql": null }, { "role": "assistant", "content": "SELECT t1.player_id, t1.inventory_id AS inventory_id_1, t2.inventory_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 social_media.users ( user_id.text, username.text, email.text, password_hash.text, fu...
[ { "role": "user", "content": "Show the usernames of users who have followers and the total count of followers for each.", "sql": null }, { "role": "assistant", "content": "SELECT T1.username, COUNT(T2.follower_user_id) AS follower_count FROM social_media.users AS T1 JOIN social_media.follows...
You are an expert in writing database language. You can write a corresponding 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 the total balance for each SUI coin type for coins with status 'exists'. Include the coin type and the sum of balances.", "sql": null }, { "role": "assistant", "content": "SELECT coin_type, SUM(CAST(balance AS DECIMAL)) AS total_balance FROM sui_coins 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 legal_services.appointments ( appointment_id character varying(64) NOT NULL, client_...
[ { "role": "user", "content": "Show me the appointment ID, start time, and subject for all appointments scheduled with lawyer 'lawyer123'.", "sql": null }, { "role": "assistant", "content": "SELECT appointment_id, start_time, subject FROM legal_services.appointments WHERE lawyer_id = 'lawyer1...
You are an expert in writing database language. You can write a corresponding 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 financial_services.loans ( loan_id text, account_id text, loan_type text, principal_...
[ { "role": "user", "content": "What is the average interest rate for auto loans (loan_type = 'Auto') with a principal amount between $20,000 and $50,000?", "sql": null }, { "role": "assistant", "content": "SELECT AVG(interest_rate) AS avg_interest_rate FROM financial_services.loans WHERE loan...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE project_fundraising_record ( id text, project_id text, project_name text, rounds_nam...
[ { "role": "user", "content": "How many fundraising rounds did each project complete?", "sql": null }, { "role": "assistant", "content": "SELECT project_name, COUNT(*) AS round_count FROM project_fundraising_record GROUP BY project_name;", "sql": null } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.conversations ( conversation_id text PRIMARY KEY, created_at timestamp,...
[ { "role": "user", "content": "Show me all group chats with their names and the time they were last active.", "sql": null }, { "role": "assistant", "content": "SELECT group_name, last_message_at FROM social_media.conversations WHERE is_group_chat = TRUE;", "sql": null }, { "role":...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id text PRIMARY KEY, property_name text...
[ { "role": "user", "content": "For each property, show the property_name, the total number of available services, and the average price of those services.", "sql": null }, { "role": "assistant", "content": "SELECT p.property_name,\n COUNT(s.service_id) AS total_available_services,\n ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id character varying(64) NOT NULL, prop...
[ { "role": "user", "content": "Get a list of room types along with their property name and the count of rooms currently Available for each type.", "sql": null }, { "role": "assistant", "content": "SELECT rt.type_name, p.property_name, COUNT(r.room_id) AS available_rooms_count\nFROM 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 healthcare.medical_records ( record_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "I would like to see a list of all medical records where the chief complaint contains the word 'cough' along with the doctor's ID and the date of the record.", "sql": null }, { "role": "assistant", "content": "SELECT record_id, doctor_id, record_date, chief_compl...