system
stringlengths
315
7.84k
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.post_hashtags ( post_hashtag_id.text, post_id.text, hashtag_id.text ) C...
[ { "role": "user", "content": "List all conversation participants along with post_hashtag details where the participant's user_id matches the hashtag_id." }, { "role": "assistant", "content": "SELECT cp.conversation_id, cp.user_id, ph.post_id, ph.hashtag_id\nFROM social_media.conversation_partici...
You are an expert in writing database language. You can write a corresponding 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 of users who liked the post with ID 'P123'." }, { "role": "assistant", "content": "SELECT DISTINCT T1.username FROM social_media.users AS T1 JOIN social_media.likes AS T2 ON T1.user_id = T2.user_id WHERE T2.post_id = 'P123';" }, { "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 social_media.users ( user_id character varying(64) NOT NULL, username character vary...
[ { "role": "user", "content": "List all users who have participated in group conversations created in April 2024, showing their username, conversation ID, and the group name." }, { "role": "assistant", "content": "SELECT DISTINCT u.username, c.conversation_id, c.group_name\nFROM social_media.conv...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.posts ( post_id.text, user_id.text, content.text, media_url.text, media...
[ { "role": "user", "content": "I want to get the list of users and their total number of public posts made in the last month, including user_id and post_count." }, { "role": "assistant", "content": "SELECT user_id, COUNT(*) AS post_count\nFROM social_media.posts\nWHERE visibility = 'public'\n AN...
You are an expert in writing database language. You can write a corresponding 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.messages ( message_id.text, conversation_id.text, sender_user_id.text, ...
[ { "role": "user", "content": "List all messages that haven’t triggered any notification; show message_id, sender_user_id, and sent_at." }, { "role": "assistant", "content": "SELECT m.message_id, m.sender_user_id, m.sent_at\nFROM social_media.messages AS m\nLEFT JOIN social_media.notifications 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 social_media.users ( user_id character varying(64) NOT NULL, username character vary...
[ { "role": "user", "content": "Show the post ID and hashtags for all posts containing the word 'conference' in their content." }, { "role": "assistant", "content": "SELECT p.post_id, h.hashtag_id, h.tag_name\nFROM social_media.posts p\nJOIN social_media.post_hashtags ph ON p.post_id = ph.post_id\...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.posts ( post_id text, user_id text, content text, media_url text, media...
[ { "role": "user", "content": "Count how many follow relationships were created in June 2024." }, { "role": "assistant", "content": "SELECT COUNT(follow_id) FROM social_media.follows WHERE created_at >= '2024-06-01' AND created_at < '2024-07-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 social_media.users ( user_id text, username text, email text, password_hash text, fu...
[ { "role": "user", "content": "I want to know the usernames of users who have followed more than three different people, along with the date they created their accounts." }, { "role": "assistant", "content": "SELECT u.username, u.created_at, COUNT(DISTINCT f.following_user_id) AS following_count\...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.users ( user_id text, username text, email text, password_hash text, fu...
[ { "role": "user", "content": "List all comments on a given post along with the commenter’s username and the comment time." }, { "role": "assistant", "content": "SELECT c.comment_id, c.content, u.username, c.created_at\nFROM social_media.comments c\nJOIN social_media.users u ON c.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 social_media.conversations ( conversation_id text PRIMARY KEY, created_at timestamp,...
[ { "role": "user", "content": "How many group conversations are there?" }, { "role": "assistant", "content": "SELECT COUNT(*) FROM social_media.conversations WHERE is_group_chat = TRUE;" } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.contracts ( contract_id character varying(64) NOT NULL, address character varyi...
[ { "role": "user", "content": "For each block, get the count of failed transactions and the total gas used by these failed transactions. Show block_number, failed_tx_count, and total_failed_gas." }, { "role": "assistant", "content": "SELECT block_number,\n COUNT(*) FILTER (WHERE status = 'f...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.guests ( guest_id character varying(64) NOT NULL, first_name ...
[ { "role": "user", "content": "Find all guests who live in the same city and list each guest's name along with the name of another guest in that city." }, { "role": "assistant", "content": "SELECT g1.first_name || ' ' || g1.last_name AS guest_name,\n g2.first_name || ' ' || g2.last_name 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 project_fundraising_record ( id character varying(32) NOT NULL, project_id character...
[ { "role": "user", "content": "I want to see pairs of fundraising rounds for projects that have at least two rounds. Please list project_name, earlier_round, earlier_investment, later_round, and later_investment." }, { "role": "assistant", "content": "SELECT\n earlier.project_name,\n earlier.ro...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.assets ( asset_id character varying(64) NOT NULL, name character va...
[ { "role": "user", "content": "Show me all assets whose symbol starts with 'BTC' or 'ETH', along with their full names and types." }, { "role": "assistant", "content": "SELECT asset_id, name, symbol, type FROM trading_platform.assets WHERE symbol LIKE 'BTC%' OR symbol LIKE '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 transportation.vehicles ( vehicle_id character varying(64) NOT NULL, license_plate c...
[ { "role": "user", "content": "List all pairs of vehicles with the same make and model but different manufacture years. Include each vehicle's ID, make, model, and both years." }, { "role": "assistant", "content": "SELECT v1.vehicle_id AS vehicle1_id, v2.vehicle_id AS vehicle2_id, v1.make, v1.mod...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.trades ( trade_id character varying(64) NOT NULL, order_id characte...
[ { "role": "user", "content": "List all trades for asset 'BTC' where the trade quantity is greater than 5." }, { "role": "assistant", "content": "SELECT trade_id, order_id, buyer_id, seller_id, quantity, price, traded_at FROM trading_platform.trades WHERE asset_id = 'BTC' AND quantity > 5;" } ]
You are an expert in writing database language. You can write a corresponding 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": "Provide a count of contracts for each unique combination of network ID and status." }, { "role": "assistant", "content": "SELECT network_id, status, COUNT(*) FROM web3.contracts GROUP BY network_id, status;" }, { "role": "user", "content": "Now, only sho...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.transactions ( transaction_id character varying(64) NOT NULL, from_address char...
[ { "role": "user", "content": "Provide a count of transactions grouped by their status." }, { "role": "assistant", "content": "SELECT status, COUNT(*) FROM web3.transactions GROUP BY status;" }, { "role": "user", "content": "Now, only show the statuses that have more than 50 transacti...
You are an expert in writing database language. You can write a corresponding 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": "For each event, display its event_id, the event_id of the previous event in the same transaction (if any), and the log_index of both events." }, { "role": "assistant", "content": "SELECT curr.event_id AS current_event_id,\n prev.event_id AS previous_event_...
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREA...
[ { "role": "user", "content": "What is the maintenance schedule for the train car with car_id 'CAR456'?" }, { "role": "assistant", "content": "I'm sorry, but I can't provide information about the maintenance schedule for train cars as it is not included in the data available in the train_cars tab...
You are an expert in writing database language. You can write a corresponding 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 the username, registration date, and the creation date of the first wallet created by each user who owns at least one wallet." }, { "role": "assistant", "content": "SELECT u.username, u.created_at AS registration_date, MIN(w.created_at) AS first_wallet_creation...
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREA...
[ { "role": "user", "content": "What is the current location of a specific train car with car_id 'TC123'?" }, { "role": "assistant", "content": "I'm sorry, but I can't provide the current location of a specific train car as this information is not stored in the database table. The table only conta...
You are an expert in writing database language. You can write a corresponding 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": "Show all fuel logs for vehicle_id 'VH123', including the timestamp, fuel type, quantity, and the location_id. Sort the list by timestamp descending." }, { "role": "assistant", "content": "SELECT fuel_log_id, log_timestamp, fuel_type, quantity, location_id\nFROM 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 insurance.policies ( policy_id character varying(64) NOT NULL, -- unique identif...
[ { "role": "user", "content": "Show me a list of all policy numbers that have a deductible exactly equal to 0." }, { "role": "assistant", "content": "SELECT policy_number\nFROM insurance.policies\nWHERE deductible = 0;" } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE project_fundraising_record ( id character varying(32) NOT NULL, project_id character...
[ { "role": "user", "content": "Show me the top 5 projects by total investment value, along with their latest fundraising round name and valuation." }, { "role": "assistant", "content": "SELECT project_name, rounds_name, valuation, SUM(investment_value) AS total_investment_value FROM project_fundr...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id character varying(64) NOT NULL, -- unique ...
[ { "role": "user", "content": "List all depots (location type 'Depot') and the number of vehicles assigned to each. Include the depot name and city." }, { "role": "assistant", "content": "SELECT T1.name , T1.city , COUNT(T2.vehicle_id) FROM transportation.locations AS T1 LEFT JOIN transportatio...
You are an expert in writing database language. You can write a corresponding 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." }, { "role": "assistant", "content": "SELECT network_id, COUNT(*) FROM web3.contracts GROUP BY network_id;" }, { "role": "user", "content": "Now, only show networks with more than 100 contracts." }, ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.claims ( claim_id character varying(64) NOT NULL, -- unique identifier...
[ { "role": "user", "content": "For each claim, count the number of beneficiaries associated with its policy. Show claim_id and beneficiary_count, only for claims with more than 2 beneficiaries." }, { "role": "assistant", "content": "SELECT c.claim_id, COUNT(pb.beneficiary_id) AS beneficiary_count...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id character varying(64) NOT NULL, -- unique ...
[ { "role": "user", "content": "Show me all drivers and the vehicles they are assigned for trips that have status 'Delayed'. Include driver first_name, driver last_name, vehicle license_plate, trip_id, and actual_departure." }, { "role": "assistant", "content": "SELECT d.first_name, d.last_name, 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 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." }, { "role": "assistant", "content": "SELECT m.vehicle_id, v.make, v.model, m.service_date, m.service_type, m.odometer_reading\nFROM transportation.maintenance_logs m...
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREA...
[ { "role": "user", "content": "What are the ticket prices for trains departing from the station with ID 'ST456'?" }, { "role": "assistant", "content": "I'm sorry, but I can't provide information on ticket prices as this data is not included in the station management database. For ticket pricing, ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.maintenance_logs ( log_id character varying(64) NOT NULL, -- uni...
[ { "role": "user", "content": "Show me all vehicles that are due for their next service before the end of this month, along with their last service type and date." }, { "role": "assistant", "content": "SELECT vehicle_id, service_type, service_date FROM transportation.maintenance_logs WHERE next_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.token_transfers ( transfer_id character varying(64) NOT NULL, -- unique id...
[ { "role": "user", "content": "List all token transfers between two distinct addresses, showing transfer_id, from_address, to_address, value, and transaction_id." }, { "role": "assistant", "content": "SELECT transfer_id, from_address, to_address, value, transaction_id\nFROM web3.token_transfers\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 text PRIMARY KEY, license_plate text, vin text,...
[ { "role": "user", "content": "Provide a list of passengers including their passenger_id, first_name, last_name, phone_number, and the total number of bookings they have made. Sort the result by booking count in descending order." }, { "role": "assistant", "content": "SELECT p.passenger_id,\n ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.events ( event_id character varying(64) NOT NULL, contract_id character varying...
[ { "role": "user", "content": "Show all token transfers including the token symbol and the address of the contract that created each token. List the transfer id, token id, value, transaction id, the contract address, and the token symbol." }, { "role": "assistant", "content": "SELECT tt.transfer_...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE financial_services.customers ( customer_id character varying(64) NOT NULL, first_nam...
[ { "role": "user", "content": "Show the average close price and total volume for market data, grouped by source." }, { "role": "assistant", "content": "SELECT source, AVG(close_price), SUM(volume) FROM financial_services.market_data GROUP BY source;" }, { "role": "user", "content": "O...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.medications ( medication_id text PRIMARY KEY, medication_name text, gener...
[ { "role": "user", "content": "I want to see pairs of medications that share the same manufacturer. Show each medication's name and its peer's medication_name along with the manufacturer." }, { "role": "assistant", "content": "SELECT t1.medication_name AS med1_name, t2.medication_name AS med2_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 transportation.routes ( route_id text PRIMARY KEY, route_number text, description te...
[ { "role": "user", "content": "For each vehicle that appears in both the maintenance logs and fuel logs tables, calculate the total maintenance cost and the total fuel cost. Display the vehicle ID and these two total costs." }, { "role": "assistant", "content": "SELECT T1.vehicle_id , SUM(T1.cos...
You are an expert in writing database language. You can write a corresponding 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": "Show the game title and the count of hidden achievements for each game." }, { "role": "assistant", "content": "SELECT T1.title , COUNT(T2.achievement_id) FROM games AS T1 JOIN achievements AS T2 ON T1.game_id = T2.game_id WHERE T2.hidden = TRUE GROUP BY T1.title...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.lawyers ( lawyer_id character varying(64) NOT NULL, -- unique id...
[ { "role": "user", "content": "List the names of all open cases, the name of the client for each case, and the name of the lead lawyer, but only for cases where the lead lawyer specializes in 'Family Law'." }, { "role": "assistant", "content": "SELECT T1.case_name , T2.first_name , T2.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 token_dexpool_info ( pair_address character varying(512) NOT NULL, -- the id of dexp...
[ { "role": "user", "content": "Which two tokens on each chain have the greatest difference in their 24h price change percentage? Show token_symbol A, token_symbol B, chain, and the absolute difference." }, { "role": "assistant", "content": "SELECT DISTINCT ON (t1.chain)\n t1.token_symbol AS symb...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.trips ( trip_id character varying(64) NOT NULL, -- unique identi...
[ { "role": "user", "content": "Can you show me all pairs of trips that use the same vehicle but have different drivers? Please include both trip IDs, vehicle_id, and the driver_id for each trip." }, { "role": "assistant", "content": "SELECT t1.trip_id AS trip_id_1, t2.trip_id AS trip_id_2, t1.veh...
You are an expert in writing database language. You can write a corresponding 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, -- unique identifier...
[ { "role": "user", "content": "Retrieve all users and their associated wallet identifiers." }, { "role": "assistant", "content": "SELECT T1.username , T2.wallet_id FROM blockchain.users AS T1 JOIN blockchain.wallets AS T2 ON T1.user_id = T2.user_id" }, { "role": "user", "content": ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.token_transfers ( transfer_id text PRIMARY KEY, token_id text, from_address tex...
[ { "role": "user", "content": "List all pairs of token transfers occurring within the same transaction where one transferred value is greater than the other, showing both transfer IDs, the transaction ID, and both values." }, { "role": "assistant", "content": "SELECT t1.transaction_id,\n t1...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.conversations ( conversation_id text PRIMARY KEY, created_at timestamp,...
[ { "role": "user", "content": "List group conversation names and the count of messages sent in each conversation after '2024-06-01'." }, { "role": "assistant", "content": "SELECT T1.group_name, COUNT(T2.message_id) FROM social_media.conversations AS T1 JOIN social_media.messages AS T2 ON T1.conve...
You are an expert in writing database language. You can write a corresponding 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, -- unique id...
[ { "role": "user", "content": "List the first name, last name, and the name of the law firm for all lawyers." }, { "role": "assistant", "content": "SELECT T1.first_name, T1.last_name, T2.firm_name FROM lawyers AS T1 JOIN law_firms AS T2 ON T1.firm_id = T2.firm_id" }, { "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.likes ( like_id character varying(64) NOT NULL, user_id character varyi...
[ { "role": "user", "content": "List user IDs and the creation timestamp of likes made by users who have email notifications enabled." }, { "role": "assistant", "content": "SELECT T1.user_id, T1.created_at FROM social_media.likes AS T1 JOIN social_media.user_settings AS T2 ON T1.user_id = T2.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 legal_services.clients ( client_id.text, first_name.text, last_name.text, company_na...
[ { "role": "user", "content": "List all documents along with the case number they are associated with, as well as the name and email of the lawyer who uploaded them." }, { "role": "assistant", "content": "SELECT d.document_name, d.document_type, d.case_id, l.first_name || ' ' || l.last_name AS la...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.invoices ( invoice_id text PRIMARY KEY, invoice_number text UNIQUE, c...
[ { "role": "user", "content": "Show me each invoice and the invoice_number of the next invoice for the same client, along with how many days apart their issue_dates are." }, { "role": "assistant", "content": "SELECT a.invoice_number AS invoice_number,\n b.invoice_number AS next_invoice_numb...
You are an expert in writing database language. You can write a corresponding 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": "Which lawyers have handled cases in the 'Federal Court' jurisdiction? Return each lawyer's first and last name, the case number, and the court jurisdiction." }, { "role": "assistant", "content": "SELECT l.first_name, l.last_name, c.case_number, c.court_jurisdiction\...
You are an expert in writing database language. You can write a corresponding 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.text, client_id.text, lawyer_id.text, c...
[ { "role": "user", "content": "How many appointments were created in the month of July 2024?" }, { "role": "assistant", "content": "SELECT COUNT(*) AS appointment_count\nFROM legal_services.appointments\nWHERE DATE_TRUNC('month', created_at) = DATE '2024-07-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 legal_services.invoices ( invoice_id.text, invoice_number.text, client_id.text, case...
[ { "role": "user", "content": "Count the total number of invoices issued in each calendar year and month. Show the year, month, and the count, ordered chronologically." }, { "role": "assistant", "content": "SELECT EXTRACT(YEAR FROM issue_date) AS issue_year, EXTRACT(MONTH FROM issue_date) AS issu...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.clients ( client_id text, first_name text, last_name text, company_na...
[ { "role": "user", "content": "I need a list of each case_number and case_name with the total hours spent on each case based on time_entries, but only include cases where the total hours is greater than 10." }, { "role": "assistant", "content": "SELECT c.case_number, c.case_name, SUM(te.hours_spe...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.law_firms ( firm_id.text, firm_name.text, address.text, phone.text, w...
[ { "role": "user", "content": "List all law firms that do not have a website registered, including their firm name and phone." }, { "role": "assistant", "content": "SELECT firm_name, phone\nFROM legal_services.law_firms\nWHERE website IS NULL OR website = '';" } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.clients ( client_id text, first_name text, last_name text, company_na...
[ { "role": "user", "content": "Show me all clients along with the total number of invoices they have and the sum of total_amount for those invoices." }, { "role": "assistant", "content": "SELECT cl.client_id, cl.first_name, cl.last_name, COUNT(inv.invoice_id) AS invoice_count, SUM(inv.total_amoun...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.documents ( document_id.text, case_id.text, document_name.text, docum...
[ { "role": "user", "content": "List the latest version of each document (identified by case_id and document_name), showing the version number and its upload_timestamp." }, { "role": "assistant", "content": "SELECT d.case_id,\n d.document_name,\n d.version AS latest_version,\n ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.invoices ( invoice_id.text, invoice_number.text, client_id.text, case...
[ { "role": "user", "content": "For each client, list their first and last invoice numbers along with the corresponding issue_dates." }, { "role": "assistant", "content": "SELECT first_inv.client_id,\n first_inv.invoice_number AS first_invoice,\n first_inv.issue_date AS first_d...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.lawyers ( lawyer_id.text, first_name.text, last_name.text, bar_number...
[ { "role": "user", "content": "Show me the invoice number and total amount for invoices, along with the case number and case name for the related case." }, { "role": "assistant", "content": "SELECT i.invoice_number, i.total_amount, c.case_number, c.case_name\nFROM legal_services.invoices i\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 erc20_balances ( block_number.bigint, contract_address.text, wallet_address.text, am...
[ { "role": "user", "content": "Show me the total amount and number of unique holder wallets for each ERC20 token held on Ethereum. Please display contract address, sum of amounts, and holder count." }, { "role": "assistant", "content": "SELECT contract_address, SUM(amount::numeric) AS total_amoun...
You are an expert in writing database language. You can write a corresponding 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, show me the creator address from the token_info_bitcoin table and the number of unique wallets currently holding that token." }, { "role": "assistant", "content": "SELECT ti.tick, ti.creator, COUNT(DISTINCT tb.wallet_address) AS unique_w...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE erc1155_approval_for_all ( block_number bigint, block_timestamp timestamp, transacti...
[ { "role": "user", "content": "For each ERC1155 NFT on Ethereum, can you show the contract address, token ID, and the total number of unique wallet holders?" }, { "role": "assistant", "content": "SELECT nh.contract_address, nh.token_id, COUNT(DISTINCT nh.wallet_address) AS unique_holders\nFROM 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 nft_holders ( block_number bigint NOT NULL, contract_address varchar NOT NULL, walle...
[ { "role": "user", "content": "Show all SUI coins with 'exists' status and more than 8 decimal places. Display coin_type, symbol, name, and decimals." }, { "role": "assistant", "content": "SELECT coin_type, symbol, name, decimals\nFROM sui_coins_metadata\nWHERE status = 'exists' AND decimals > 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 erc1155_approval_for_all ( block_number bigint NOT NULL, block_timestamp timestamp(3...
[ { "role": "user", "content": "Show me the wallet addresses that hold more than 1000 of any ERC20 token, along with the token symbol and amount, from the erc20_balances table." }, { "role": "assistant", "content": "SELECT e.wallet_address, t.symbol, e.amount FROM erc20_balances e JOIN token_price...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE token_metas ( block_timestamp.timestamp, block_number.bigint, transaction_hash.text,...
[ { "role": "user", "content": "List the ERC20 tokens (from token_metas) with exactly 6 decimals. Show their symbol, contract_address, and name." }, { "role": "assistant", "content": "SELECT symbol, contract_address, name FROM token_metas WHERE is_erc20 = 1 AND decimals = 6;" }, { "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 gaming_technology.game_sessions ( session_id uuid NOT NULL DEFAULT gen_random_uu...
[ { "role": "user", "content": "Find the date (calendar day) with the highest total number of game sessions. Show the date and the total session count." }, { "role": "assistant", "content": "SELECT CAST(start_time AS DATE) AS session_date, COUNT(*) AS total_sessions\nFROM gaming_technology.game_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 gaming_technology.players ( player_id uuid PRIMARY KEY, username text, email text, p...
[ { "role": "user", "content": "Give me each server's name, the region, and the maximum number of players that have been connected at once." }, { "role": "assistant", "content": "SELECT s.server_id, s.server_name, s.region, MAX(s.current_players) AS max_players_seen\nFROM gaming_technology.servers...
You are an expert in writing database language. You can write a corresponding 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": "List the usernames and registration dates for all players from 'Canada'." }, { "role": "assistant", "content": "SELECT username, registration_date FROM gaming_technology.players WHERE country_code = 'Canada';" }, { "role": "user", "content": "Now, only 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 gaming_technology.players ( player_id uuid NOT NULL DEFAULT gen_random_uuid(), usern...
[ { "role": "user", "content": "Retrieve the title and release_date of all games on the 'PC' platform." }, { "role": "assistant", "content": "SELECT title, release_date\nFROM gaming_technology.games\nWHERE platform = 'PC';" }, { "role": "user", "content": "Now exclude any games release...
You are an expert in writing database language. You can write a corresponding 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": "I need to list all pairs of in-game items in the same game where one item is Epic and the other is Legendary, showing game_id, epic_item, and legendary_item." }, { "role": "assistant", "content": "SELECT a.game_id,\n a.item_name AS epic_item,\n b.item_na...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.games ( game_id.uuid, title.text, developer_id.uuid, publisher_id....
[ { "role": "user", "content": "Could you list the title of each game and the total quantity of items acquired by players for that specific game?" }, { "role": "assistant", "content": "SELECT g.title, SUM(pi.quantity) AS total_acquired_quantity FROM gaming_technology.games g 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 gaming_technology.game_sessions ( session_id uuid NOT NULL DEFAULT gen_random_uuid()...
[ { "role": "user", "content": "List the name and points of all hidden achievements." }, { "role": "assistant", "content": "SELECT name, points\nFROM gaming_technology.achievements\nWHERE hidden = true;" }, { "role": "user", "content": "Only include those with points greater than 50." ...
You are an expert in writing database language. You can write a corresponding 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 NOT NULL DEFAULT gen_rand...
[ { "role": "user", "content": "Can you show the total quantity of all in-game items held by each player?" }, { "role": "assistant", "content": "SELECT player_id, SUM(quantity) AS total_quantity\nFROM gaming_technology.player_inventory\nGROUP BY player_id;" }, { "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 gaming_technology.servers ( server_id uuid, game_id uuid, server_name text, region t...
[ { "role": "user", "content": "Show me all pairs of servers that are located in the same region, listing both server names and their region." }, { "role": "assistant", "content": "SELECT s1.server_name AS server1_name, s2.server_name AS server2_name, s1.region FROM gaming_technology.servers s1 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 gaming_technology.players ( player_id uuid PRIMARY KEY, username text, email text, p...
[ { "role": "user", "content": "For each game, find the hidden achievement with the highest points and show the game title, achievement name, and points." }, { "role": "assistant", "content": "SELECT g.title AS game_title,\n a.name AS achievement_name,\n a.points\nFROM gaming_technolo...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.achievements ( achievement_id uuid, game_id uuid, name text, descr...
[ { "role": "user", "content": "List all achievements with more than 100 points." }, { "role": "assistant", "content": "SELECT *\nFROM gaming_technology.achievements\nWHERE points > 100;" }, { "role": "user", "content": "Now exclude any hidden achievements." }, { "role": "assis...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.servers ( server_id uuid NOT NULL DEFAULT gen_random_uuid(), game_...
[ { "role": "user", "content": "List all servers that are currently online. Show their name, region, current player count, and maximum player capacity." }, { "role": "assistant", "content": "SELECT server_name, region, current_players, max_players FROM gaming_technology.servers WHERE status = 'onl...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.game_sessions ( session_id uuid, player_id uuid, game_id uuid, ser...
[ { "role": "user", "content": "For each player, show the total number of achievements they have unlocked and their total game session count." }, { "role": "assistant", "content": "SELECT p.player_id, COUNT(pa.achievement_id) AS total_achievements_unlocked, COUNT(gs.session_id) AS total_sessions\n...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.games ( game_id uuid NOT NULL DEFAULT gen_random_uuid(), -- un...
[ { "role": "user", "content": "List pairs of games that share the same publisher but belong to different genres, showing both titles and genres." }, { "role": "assistant", "content": "SELECT g1.game_id AS game1_id,\n g1.title AS title1,\n g1.genre AS genre1,\n g2.game_id AS game...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.players ( player_id uuid NOT NULL DEFAULT gen_random_uuid(), usern...
[ { "role": "user", "content": "List all in-game items of type 'Consumable', showing for each item the item name, cost amount, and the total number of players who have that item in their inventory." }, { "role": "assistant", "content": "SELECT i.item_name, i.cost_amount, COUNT(DISTINCT pi.player_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 gaming_technology.games ( game_id uuid PRIMARY KEY, title text, developer_id uuid, p...
[ { "role": "user", "content": "List all game sessions that lasted longer than 30 minutes. Show the session_id, player_id, game_id, and duration_seconds." }, { "role": "assistant", "content": "SELECT session_id, player_id, game_id, duration_seconds FROM gaming_technology.game_sessions WHERE durati...
You are an expert in writing database language. You can write a corresponding 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_achievements ( player_achievement_id uuid, player_id uuid, ...
[ { "role": "user", "content": "Show the number of achievements unlocked by each player per month. Display player_id, month (as YYYY-MM), and achievement_count." }, { "role": "assistant", "content": "SELECT player_id,\n TO_CHAR(unlocked_at, 'YYYY-MM') AS year_month,\n COUNT(*) AS 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 gaming_technology.player_achievements ( player_achievement_id uuid NOT NULL DEFAULT ...
[ { "role": "user", "content": "Can you list for each player their most recent and second most recent achievements, showing columns player_id, recent_achievement_id, second_recent_achievement_id, and recent_unlocked_at?" }, { "role": "assistant", "content": "SELECT recent.player_id,\n recent...
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, player_id uuid, game_...
[ { "role": "user", "content": "For each server, what is the earliest and latest start time of its sessions?" }, { "role": "assistant", "content": "SELECT server_id, MIN(start_time), MAX(start_time) FROM gaming_technology.game_sessions GROUP BY server_id;" }, { "role": "user", "content...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.posts ( post_id text, user_id text, content text, media_url text, media...
[ { "role": "user", "content": "List all posts created by user 'U100' in March 2024." }, { "role": "assistant", "content": "SELECT post_id, user_id, content, created_at FROM social_media.posts WHERE user_id = 'U100' AND created_at >= '2024-03-01' AND created_at < '2024-04-01';" }, { "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 Index 'suppliers'. Mapping: { properties: { supplier_id: { type: 'keyword' }, supplier_name: { ty...
[ { "role": "user", "content": "특정 국가의 모든 공급업체 정보를 조회하고 싶습니다. 국가 이름, 공급업체 이름, 주소, 품질 등급을 포함해 주세요." }, { "role": "assistant", "content": "GET suppliers/_search\n{\n \"query\": {\n \"term\": {\n \"country\": \"Korea\"\n }\n },\n \"_source\": [\"supplier_name\", \"address\", \"country\"...
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, policy_id text, cu...
[ { "role": "user", "content": "Show me all beneficiaries who are listed as 'Sibling' or 'Parent' on policies where their share is between 20 and 60 percent. Include beneficiary_id, policy_id, first_name, last_name, relationship, and percentage_share." }, { "role": "assistant", "content": "SELECT ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure Node Label ':AircraftModel'. Properties: { model_id: String (Constraint: UNIQUE), model_name: Str...
[ { "role": "user", "content": "Can you help me fetch the inventory details for components associated with a specific aircraft build, including the batch number, quantity, and warehouse location?" }, { "role": "assistant", "content": "MATCH (ab:AircraftBuild {build_id: 'specific_build_id'})-[:IS_M...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.hashtags ( hashtag_id character varying(64) NOT NULL, tag_name characte...
[ { "role": "user", "content": "List all hashtag names and their creation dates." }, { "role": "assistant", "content": "SELECT tag_name, created_at FROM social_media.hashtags;" }, { "role": "user", "content": "Please only include hashtags created in the year 2023." }, { "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 social_media.users ( user_id.text, username.text, email.text, password_hash.text, fu...
[ { "role": "user", "content": "How many users were registered in each month of 2024?" }, { "role": "assistant", "content": "SELECT date_trunc('month', created_at) AS month, COUNT(*) AS user_count\nFROM social_media.users\nWHERE created_at >= '2024-01-01'\n AND created_at < '2025-01-01'\nGROUP BY...
You are an expert in writing database language. You can write a corresponding 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." }, { "role": "assistant", "content": "SELECT h1.hashtag_id AS hashtag1_id, h1.created_at AS created1, h2.hashtag_id AS hashtag2_id, h2.created_at AS c...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.doctors ( doctor_id character varying(64) NOT NULL, first_name character ...
[ { "role": "user", "content": "Can you show me the count of new doctors added each month in 2023? Return the month and number of doctors." }, { "role": "assistant", "content": "SELECT DATE_TRUNC('month', created_at) AS month, COUNT(*) AS doctor_count\nFROM healthcare.doctors\nWHERE created_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 healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birt...
[ { "role": "user", "content": "What is the average number of refills allowed across all prescriptions?" }, { "role": "assistant", "content": "SELECT AVG(refills_allowed) FROM healthcare.prescriptions;" } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.medications ( medication_id character varying(64) NOT NULL, -- unique...
[ { "role": "user", "content": "List the medication_id, medication_name, and description for all medications whose generic_name starts with 'A'." }, { "role": "assistant", "content": "SELECT medication_id, medication_name, description\nFROM healthcare.medications\nWHERE generic_name LIKE '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 healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birt...
[ { "role": "user", "content": "Show me a list of all patient names along with the full names of their doctors for appointments scheduled in February 2024." }, { "role": "assistant", "content": "SELECT p.first_name AS patient_first_name, p.last_name AS patient_last_name, d.first_name AS doctor_fir...
You are an expert in writing database language. You can write a corresponding 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": "List appointment IDs, patient first and last names, and their chief complaint for appointments that have an associated medical record." }, { "role": "assistant", "content": "SELECT a.appointment_id, p.first_name, p.last_name, mr.chief_complaint\nFROM healthcare.appo...
You are an expert in writing database language. You can write a corresponding 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." }, { "role": "assistant", "content": "SELECT a.appointment_id, a.appointment_time::date AS appointment_date,\n COUNT(pr.prescription_id) ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.doctors ( doctor_id character varying(64) NOT NULL, -- unique identi...
[ { "role": "user", "content": "List the description and diagnosis date for all diagnoses that are marked as chronic and were made in the year 2023." }, { "role": "assistant", "content": "SELECT description, diagnosis_date FROM healthcare.diagnoses WHERE is_chronic = true AND diagnosis_date BETWEE...
You are an expert in writing database language. You can write a corresponding 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": "List all prescriptions with medication details. Return prescription_id, patient full name, medication_name, and prescription_date." }, { "role": "assistant", "content": "SELECT pr.prescription_id,\n p.first_name || ' ' || p.last_name AS patient_name,\n 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.patients ( patient_id character varying(64) NOT NULL, first_name characte...
[ { "role": "user", "content": "List each patient's first and last name along with the insurance plan name they are enrolled in, including only primary policies. Return patient_id, first_name, last_name, and plan_name." }, { "role": "assistant", "content": "SELECT p.patient_id,\n p.first_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 healthcare.doctors ( doctor_id character varying(64) NOT NULL, first_name character ...
[ { "role": "user", "content": "Show a list of diagnoses along with the chief complaint noted in the corresponding medical record. Display diagnosis description, diagnosis date, and the chief complaint." }, { "role": "assistant", "content": "SELECT T1.description, T1.diagnosis_date, T2.chief_compl...