Dataset Viewer
Auto-converted to Parquet Duplicate
system
stringlengths
315
11.5k
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 legal_services.clients ( client_id character varying(64) NOT NULL, first_name charac...
[ { "role": "user", "content": "Show all cases with at least one billed and billable time entry, including case number, case name, total billed amount, and billed hours.", "sql": null }, { "role": "assistant", "content": "SELECT cs.case_number, cs.case_name, SUM(te.hours_spent * te.billing_rat...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.lawyers ( lawyer_id character varying(64) NOT NULL, -- unique id...
[ { "role": "user", "content": "List all partners who have provided a phone number, showing their full name and email.", "sql": null }, { "role": "assistant", "content": "SELECT first_name, last_name, email FROM legal_services.lawyers WHERE is_partner = TRUE AND phone IS NOT NULL;", "sql":...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.appointments ( appointment_id character varying(64) NOT NULL, patient_id ...
[ { "role": "user", "content": "List appointments with a duration longer than 45 minutes where the 'reason' includes the word 'follow-up'. Show the appointment ID, patient ID, duration, and reason.", "sql": null }, { "role": "assistant", "content": "SELECT appointment_id, patient_id, duration_...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.premium_payments ( payment_id text PRIMARY KEY, policy_id text, customer_i...
[ { "role": "user", "content": "For each customer, calculate the average number of days between their consecutive premium payments.", "sql": null }, { "role": "assistant", "content": "SELECT t.customer_id,\n AVG(t.days_diff) AS avg_days_between\nFROM (\n SELECT p1.customer_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 transportation.vehicles ( vehicle_id text PRIMARY KEY, license_plate text, vin text,...
[ { "role": "user", "content": "List maintenance logs including vehicle make, model, service_date, cost, and next_service_due_date for vehicles that are currently 'Active'.", "sql": null }, { "role": "assistant", "content": "SELECT ml.log_id,\n v.make,\n v.model,\n ml.service...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE narrative_info ( narrative.text, top_3_coins.text, price_change_percentage_1h.numeri...
[ { "role": "user", "content": "List all narratives with a trend rank better than 50, showing the narrative name and their listed 'Top 3 Coins'.", "sql": null }, { "role": "assistant", "content": "SELECT narrative, top_3_coins FROM narrative_info WHERE trend_rank < 50", "sql": null }, ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE token_metas ( block_timestamp.timestamp, block_number.bigint, transaction_hash.text,...
[ { "role": "user", "content": "For each ERC1155 NFT contract on Ethereum, show the contract address, token_id, and the total amount held across all wallets.", "sql": null }, { "role": "assistant", "content": "SELECT nh.contract_address, nh.token_id, SUM(CAST(nh.amount AS NUMERIC)) AS total_am...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.transactions ( transaction_id text, from_address text, to_address text, value n...
[ { "role": "user", "content": "For each transaction, find the next transaction by the same sender. Show the original transaction_id as current_tx, the next transaction_id as next_tx, from_address, and the time difference in minutes between them.", "sql": null }, { "role": "assistant", "conten...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.transactions ( transaction_id character varying(64) NOT NULL, from_address char...
[ { "role": "user", "content": "Find the top 5 transactions with the highest gas prices that were successful, including the from_address, to_address, and block_number.", "sql": null }, { "role": "assistant", "content": "SELECT from_address, to_address, block_number, gas_price FROM web3.transac...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.routes ( route_id text, route_number text, description text, origin_l...
[ { "role": "user", "content": "Can you show me all routes where the origin_location_id is the same as the destination_location_id? List their route_id, route_number, and type.", "sql": null }, { "role": "assistant", "content": "SELECT route_id, route_number, type\nFROM transportation.routes\n...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.cases ( case_id text, case_number text, case_name text, client_id tex...
[ { "role": "user", "content": "Find all cases that were closed in the year 2022, showing their case name, case number, and date closed.", "sql": null }, { "role": "assistant", "content": "SELECT case_name, case_number, date_closed FROM legal_services.cases WHERE date_closed >= '2022-01-01' 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 government_services.citizens ( citizen_id text PRIMARY KEY, national_id_number text,...
[ { "role": "user", "content": "List the city and the count of accessible and inaccessible service locations separately. Return city, accessible_count, and inaccessible_count.", "sql": null }, { "role": "assistant", "content": "SELECT city,\n SUM(CASE WHEN is_accessible THEN 1 ELSE 0 END...
You are an expert in writing database language. You can write a corresponding 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": "List the medication_id and medication_name for all medications with a generic name that starts with 'Amox'.", "sql": null }, { "role": "assistant", "content": "SELECT medication_id, medication_name\nFROM healthcare.medications\nWHERE generic_name ILIKE 'Amox%';"...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE financial_services.securities ( security_id text PRIMARY KEY, ticker_symbol text, is...
[ { "role": "user", "content": "List all securities issued by 'Morgan Stanley' along with their ticker_symbol, security_name, and exchange. Then also show the sector for each.", "sql": null }, { "role": "assistant", "content": "SELECT ticker_symbol, security_name, exchange, sector FROM financi...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.agents ( agent_id text, first_name text, last_name text, agency_name text,...
[ { "role": "user", "content": "Can you retrieve the document_id, file_name, file_size_bytes, uploaded_at, and the full name of the agent (first and last name concatenated) for all documents uploaded in 2024 by active agents licensed in CA?", "sql": null }, { "role": "assistant", "content": "S...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.patient_insurance ( patient_insurance_id.text, patient_id.text, plan_id.t...
[ { "role": "user", "content": "How many insurance policies does each subscriber have? Please display the subscriber name and policy count.", "sql": null }, { "role": "assistant", "content": "SELECT subscriber_name, COUNT(*) AS policy_count FROM healthcare.patient_insurance GROUP BY subscriber...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.users ( user_id text PRIMARY KEY, username text, email text, password_h...
[ { "role": "user", "content": "How many users have non-empty full_name and bio fields? Return only the count.", "sql": null }, { "role": "assistant", "content": "SELECT COUNT(*)\nFROM social_media.users\nWHERE full_name IS NOT NULL\n AND full_name <> ''\n AND bio IS NOT NULL\n AND bio <> '...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE financial_services.market_data ( data_point_id bigint, security_id text, data_timest...
[ { "role": "user", "content": "I need to compare consecutive daily close_prices for each security to find when the close_price increased compared to the previous day.", "sql": null }, { "role": "assistant", "content": "SELECT a.security_id, b.data_timestamp AS prev_date, b.close_price AS prev...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure Collection 'assembly_steps'. Document structure: { _id: <ObjectId (or step_id)>, step_id: String,...
[ { "role": "user", "content": "特定の組み立てラインに関連するすべての手順を取得したいです。ラインIDと手順名、手順番号、必要なスキルレベルを含めてください。", "sql": null }, { "role": "assistant", "content": "db.assembly_steps.find(\n { line_id: '<specific_line_id>' },\n { step_id: 1, line_id: 1, step_number: 1, step_name: 1, required_skill_level:...
You are an expert in writing database language. You can write a corresponding 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": "Which agencies offer more than three services? List the agency ID and the total number of services they provide.", "sql": null }, { "role": "assistant", "content": "SELECT agency_id, COUNT(service_id) AS total_services\nFROM government_services.services\nGROUP B...
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 detailed repair history of the equipment used by the staff with staff_id 'STAFF123' during maintenance tasks?", "sql": null }, { "role": "assistant", "content": "I'm sorry, but I can't provide information on the detailed repair history of equipment u...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE erc20_balances ( block_number.bigint, contract_address.text, wallet_address.text, am...
[ { "role": "user", "content": "Which wallets currently hold more than 200 units of ERC1155 NFTs on the Ethereum blockchain? Show the contract address, token ID, wallet address, and amount.", "sql": null }, { "role": "assistant", "content": "SELECT nh.contract_address, nh.token_id, nh.wallet_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.medications ( medication_id character varying(64) NOT NULL, medication_na...
[ { "role": "user", "content": "Show the medication_id, medication_name, and manufacturer for all medication entries.", "sql": null }, { "role": "assistant", "content": "SELECT medication_id, medication_name, manufacturer FROM healthcare.medications;", "sql": null }, { "role": "use...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.users ( user_id text, username text, email text, password_hash text, fu...
[ { "role": "user", "content": "Show me all users and the posts they have created, including the user's username and the post content.", "sql": null }, { "role": "assistant", "content": "SELECT u.username, p.post_id, p.content\nFROM social_media.users u\nJOIN social_media.posts p ON u.user_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 gaming_technology.servers ( server_id.uuid, game_id.uuid, server_name.text, region.t...
[ { "role": "user", "content": "Show me all servers in the same region that have different statuses. I want to see the server names, regions, and their statuses for each pair.", "sql": null }, { "role": "assistant", "content": "SELECT s1.server_name AS server1, s2.server_name AS server2, s1.re...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.appointments ( appointment_id text, patient_id text, doctor_id text, appo...
[ { "role": "user", "content": "I’d like to see a list of appointments along with any prescriptions made on the same day. Include appointment_id, prescription_id, medication_name, and appointment_time.", "sql": null }, { "role": "assistant", "content": "SELECT a.appointment_id, p.prescription_...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash text,...
[ { "role": "user", "content": "List all ERC20 tokens from the `token_metas` table that have a total supply greater than 1 followed by 21 zeros. Show their contract address, symbol, name, and total supply.", "sql": null }, { "role": "assistant", "content": "SELECT contract_address, symbol, 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 the top 5 properties by average overall review rating.", "sql": null }, { "role": "assistant", "content": "SELECT p.property_name, AVG(r.rating_overall) AS avg_rating\nFROM hospitality_technology.properties p\nJOIN hospitality_technology.reviews r\n ON p.p...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.tokens ( token_id character varying(64) NOT NULL, -- unique identifier for...
[ { "role": "user", "content": "List all tokens with a total supply greater than 1,000,000.", "sql": null }, { "role": "assistant", "content": "SELECT token_id, token_name, token_symbol, contract_address, total_supply\nFROM web3.tokens\nWHERE total_supply > 1000000;", "sql": null }, { ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.users ( user_id character varying(64) NOT NULL, -- unique identifi...
[ { "role": "user", "content": "Show me for each user how many conversations they've participated in, include their email and conversation count, only for those who have participated in more than five conversations.", "sql": null }, { "role": "assistant", "content": "SELECT u.user_id, u.email,...
You are an expert in writing database language. You can write a corresponding 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": "What is the total balance and the number of accounts for each currency, including only accounts opened in the last 2 years?", "sql": null }, { "role": "assistant", "content": "SELECT currency , SUM(balance) AS total_balance , COUNT(*) AS account_count FROM fin...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.employees ( employee_id character varying(64) NOT NULL, -- u...
[ { "role": "user", "content": "List the full names of all employees who are currently employed (i.e., have no termination date).", "sql": null }, { "role": "assistant", "content": "SELECT first_name || ' ' || last_name AS full_name FROM government_services.employees WHERE termination_date IS ...
You are an expert in writing database language. You can write a corresponding 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": "Find pairs of active services from the same agency where one service's average processing time is longer than the other's. Display the agency_id, the slower service name with its processing time, and the faster service name with its processing time.", "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.players ( player_id uuid NOT NULL DEFAULT gen_random_uuid(), -...
[ { "role": "user", "content": "For each player, list their username and the total number of unique servers they have played on, only including players who have played on two or more different servers. Also show the titles of all games they've played sessions on.", "sql": null }, { "role": "assist...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.players ( player_id uuid NOT NULL DEFAULT gen_random_uuid(), -...
[ { "role": "user", "content": "List all in-game items' names, types, and rarity along with their total cost in USD, for items that belong to games released on or after 2021-01-01.", "sql": null }, { "role": "assistant", "content": "SELECT i.item_name, i.item_type, i.rarity, i.cost_amount\nFRO...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.citizens ( citizen_id character varying(64) NOT NULL, -- un...
[ { "role": "user", "content": "How many citizens registered in each year?", "sql": null }, { "role": "assistant", "content": "SELECT DATE_PART('year', registration_date) AS year,\n COUNT(*) AS registration_count\nFROM government_services.citizens\nGROUP BY DATE_PART('year', registration...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.policies ( policy_id text PRIMARY KEY, customer_id text, product_id text, ...
[ { "role": "user", "content": "List policy pairs for the same customer where one policy was cancelled and another active policy started within 30 days after the cancellation. Show customer_id, cancelled policy_number, cancellation_date, active policy_number, start_date.", "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 government_services.agencies ( agency_id character varying(64) NOT NULL, agency_name...
[ { "role": "user", "content": "List all job titles of employees who work in the 'Finance' department.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT job_title\nFROM government_services.employees\nWHERE department = 'Finance';", "sql": null } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.orders ( order_id.text, user_id.text, wallet_id.text, asset_id.text...
[ { "role": "user", "content": "Show each order with its previous order timestamp for the same user.", "sql": null }, { "role": "assistant", "content": "SELECT o.order_id, o.user_id, o.created_at AS current_time, MAX(prev.created_at) AS previous_time\nFROM trading_platform.orders o\nLEFT JOIN ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.games ( game_id uuid, title text, developer_id uuid, publisher_id ...
[ { "role": "user", "content": "Can you provide a list of all players who have acquired at least one item, along with the item name, its type, and the title of the game that item belongs to?", "sql": null }, { "role": "assistant", "content": "SELECT pi.player_id, items.item_name, items.item_ty...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.contracts ( contract_id character varying(64) NOT NULL, -- unique identifi...
[ { "role": "user", "content": "Show all contracts deployed on 'testnet', including the contract_id, address, deployer_address, and deployed_at.", "sql": null }, { "role": "assistant", "content": "SELECT contract_id, address, deployer_address, deployed_at\nFROM web3.contracts\nWHERE network_id...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.doctors ( doctor_id text, first_name text, last_name text, specialty text...
[ { "role": "user", "content": "List all insurance plans along with their provider, plan type, and the contact phone number. Also, for each plan, show how many doctors have their hospital affiliation ID matching the plan ID.", "sql": null }, { "role": "assistant", "content": "SELECT ip.plan_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 token_basic_info ( coin_id character varying(100) NOT NULL, -- the id of the token t...
[ { "role": "user", "content": "Which narratives saw the highest average net flow from smart money performance this year, and what is the average roi for those narratives along with the total number of tokens in each?", "sql": null }, { "role": "assistant", "content": "SELECT tbi.narrative, AV...
You are an expert in writing database language. You can write a corresponding 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 the full names of all patients who have received a diagnosis for 'hypertension', along with the appointment time and the doctor's full name for each related appointment.", "sql": null }, { "role": "assistant", "content": "SELECT p.first_name, p.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 manufacturing.materials ( material_id character varying(64) NOT NULL, -- unique...
[ { "role": "user", "content": "特定の材料を使用しているコンポーネントの組み立て手順を確認したいです。材料IDと材料名、組み立て手順のステップ名と説明を含めてください。", "sql": null }, { "role": "assistant", "content": "SELECT m.material_id, m.material_name, s.step_name, s.description\nFROM manufacturing.materials m\nJOIN manufacturing.assembly_steps s ON m.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.documents ( document_id text, case_id text, document_name text, docum...
[ { "role": "user", "content": "Show the latest version number of each document_name for every case.", "sql": null }, { "role": "assistant", "content": "SELECT case_id,\n document_name,\n MAX(version) AS latest_version\nFROM legal_services.documents\nGROUP BY case_id, document_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 insurance.policies ( policy_id.text, customer_id.text, product_id.text, agent_id.tex...
[ { "role": "user", "content": "List all policies that expired in the last 30 days, along with their product IDs and premium amounts.", "sql": null }, { "role": "assistant", "content": "SELECT policy_id, product_id, premium_amount FROM insurance.policies WHERE end_date BETWEEN DATE_SUB(CURRENT...
You are an expert in writing database language. You can write a corresponding 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": "List all pairs of patients who registered on the same day. Show patient1_id, patient1_name, patient2_id, patient2_name, and the shared registration date.", "sql": null }, { "role": "assistant", "content": "SELECT p1.patient_id AS patient1_id, p1.first_name || ' ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.citizens ( citizen_id text, national_id_number text, first_name ...
[ { "role": "user", "content": "List all appointments showing the scheduled time, the name of the service, and the name of the location.", "sql": null }, { "role": "assistant", "content": "SELECT T1.scheduled_start_time, T2.service_name, T3.location_name FROM government_services.appointments 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 government_services.agencies ( agency_id character varying(64) NOT NULL, agency_name...
[ { "role": "user", "content": "List the full name of employees and the names of the agencies they work for, but only for employees who are currently employed.", "sql": null }, { "role": "assistant", "content": "SELECT e.first_name || ' ' || e.last_name AS employee_full_name, a.agency_name\nFR...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.patients ( patient_id character varying(64) NOT NULL, -- unique iden...
[ { "role": "user", "content": "List all patients along with their primary insurance plan name and the first and last name of their prescribing doctor for any prescription they have received.", "sql": null }, { "role": "assistant", "content": "SELECT p.patient_id, p.first_name AS patient_first...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.passengers ( passenger_id text PRIMARY KEY, first_name text, last_nam...
[ { "role": "user", "content": "Show each pair of passengers who share the same loyalty_program_id but have different registration times. Return p1.first_name AS earlier, p2.first_name AS later, and loyalty_program_id.", "sql": null }, { "role": "assistant", "content": "SELECT p1.first_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 token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash varch...
[ { "role": "user", "content": "I want to list the top 5 ERC20 tokens by number of distinct wallet holders, showing their symbol, name, and holder_count.", "sql": null }, { "role": "assistant", "content": "SELECT tm.symbol,\n tm.name,\n COUNT(DISTINCT eb.wallet_address) AS holder_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 Node Label ':Component'. Properties: { component_id: String (Constraint: UNIQUE), part_number: St...
[ { "role": "user", "content": "I need to check the inventory status of components, including their batch details and warehouse location.", "sql": null }, { "role": "assistant", "content": "MATCH (i:InventoryBatch)-[:IS_INSTANCE_OF]->(c:Component)\nRETURN c.component_id, c.component_name, i.in...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.posts ( post_id.text, user_id.text, content.text, media_url.text, media...
[ { "role": "user", "content": "List all group chat conversations and the number of messages in each group chat.", "sql": null }, { "role": "assistant", "content": "SELECT c.conversation_id,\n c.group_name,\n COUNT(m.message_id) AS message_count\nFROM social_media.conversations c\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 healthcare.medical_records ( record_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "List the record ID, record date, patient ID, and chief complaint for medical records belonging to patients whose last name is 'Smith'. Also include the patient's last name in the results.", "sql": null }, { "role": "assistant", "content": "SELECT mr.record_id, 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 financial_services.accounts ( account_id text, customer_id text, account_number text...
[ { "role": "user", "content": "For each account, show account_number, customer_id, and the count of other accounts the same customer has.", "sql": null }, { "role": "assistant", "content": "SELECT a.account_number, a.customer_id, COUNT(b.account_id) AS other_account_count FROM financial_servi...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.agencies ( agency_id text PRIMARY KEY, agency_name text, jurisdi...
[ { "role": "user", "content": "List the application IDs and statuses for applications assigned to employees in the 'Customer Service' department.", "sql": null }, { "role": "assistant", "content": "SELECT a.application_id, a.status\nFROM government_services.applications a\nJOIN 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 legal_services.documents ( document_id text, case_id text, document_name text, docum...
[ { "role": "user", "content": "Show me all documents along with the document name and type, together with both the upload_timestamp and the lawyer ID who uploaded them.", "sql": null }, { "role": "assistant", "content": "SELECT document_id, document_name, document_type, upload_timestamp, uplo...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.reservations ( reservation_id character varying(64) NOT N...
[ { "role": "user", "content": "List all reviews where the cleanliness rating is 3 or below. Include the review comment and the full name of the guest who submitted it.", "sql": null }, { "role": "assistant", "content": "SELECT T1.comment, T2.first_name, T2.last_name FROM hospitality_technolog...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.claim_documents ( document_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "For each document type, how many documents were uploaded by each user? Show the uploaded_by, document_type, and document count, ordered by document_type and count descending.", "sql": null }, { "role": "assistant", "content": "SELECT uploaded_by, document_type, ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.rooms ( room_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "List all room numbers with their room type name and property name for rooms that have a Jacuzzi feature.", "sql": null }, { "role": "assistant", "content": "SELECT r.room_number, rt.type_name, p.property_name\nFROM hospitality_technology.rooms r\nJOIN hospitalit...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.reviews ( review_id.text, property_id.text, reservation_id.te...
[ { "role": "user", "content": "List public reviews whose comment contains the word 'slow'.", "sql": null }, { "role": "assistant", "content": "SELECT review_id, comment, review_date, rating_overall, property_id FROM hospitality_technology.reviews WHERE is_public = TRUE AND LOWER(comment) LIKE...
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
3