system
stringlengths
323
8.44k
conversations
listlengths
2
8
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.game_sessions ( session_id uuid PRIMARY KEY, player_id uuid, game_...
[ { "content": "Show the total session duration in seconds and the average score for each game.", "role": "user", "sql": null }, { "content": "SELECT game_id, SUM(duration_seconds), AVG(score) FROM gaming_technology.game_sessions GROUP BY game_id;", "role": "assistant", "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 varch...
[ { "content": "Which wallets currently hold more than 200 units of any ERC1155 NFT, and what is the token ID and contract address for each such holding?", "role": "user", "sql": null }, { "content": "SELECT contract_address, token_id, wallet_address, amount FROM nft_holders WHERE contract_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 financial_services.accounts ( account_id character varying(64) NOT NULL, -- uniq...
[ { "content": "Show me the full name and job title for all employees who were hired in the last 3 years, along with the full name of their manager.", "role": "user", "sql": null }, { "content": "SELECT e.first_name || ' ' || e.last_name AS employee_full_name, e.job_title, m.first_name || ' ' || 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 transportation.vehicles ( vehicle_id.text, license_plate.text, vin.text, make.text, ...
[ { "content": "Can you provide the total number of fuel refueling events and the sum of total_cost at each fueling location, including the location name and city?", "role": "user", "sql": null }, { "content": "SELECT l.location_id, l.name, l.city, COUNT(fl.fuel_log_id) AS num_refuels, SUM(fl.tota...
You are an expert in writing database language. You can write a corresponding 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...
[ { "content": "Find pairs of servers in the same region where one server's current_players is more than twice that of another. Return the region, server1 name, server2 name, and their current_players counts.", "role": "user", "sql": null }, { "content": "SELECT s1.region,\n s1.server_name 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 Node Label ':AircraftModel'. Properties: { model_id: String (Constraint: UNIQUE), model_name: Str...
[ { "content": "我想查询某个飞机构建的所有检查记录,包括检查类型、检查结果、检查时间以及被检查的组件名称。", "role": "user", "sql": null }, { "content": "MATCH (ab:AircraftBuild)-[:UNDERWENT]->(i:Inspection)-[:INSPECTED_COMPONENT]->(c:Component)\nWHERE ab.build_id = 'specific_build_id'\nRETURN i.inspection_type, i.result, i.inspection_timest...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE project_fundraising_record ( id.text, project_id.text, project_name.text, rounds_nam...
[ { "content": "How many projects raised funds in 2023?", "role": "user", "sql": null }, { "content": "SELECT COUNT(*) AS project_count\nFROM project_fundraising_record\nWHERE investment_date LIKE '2023-%';", "role": "assistant", "sql": null }, { "content": "Also provide the averag...
You are an expert in writing database language. You can write a corresponding 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...
[ { "content": "Count the number of contracts per network and status.", "role": "user", "sql": null }, { "content": "SELECT\n network_id,\n status,\n COUNT(*) AS contract_count\nFROM web3.contracts\nGROUP BY network_id, status;", "role": "assistant", "sql": null }, { "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 project_fundraising_record ( id character varying(32) NOT NULL, project_id character...
[ { "content": "Show me the top 5 projects by total investment value, along with their latest fundraising round name and valuation.", "role": "user", "sql": null }, { "content": "SELECT project_name, rounds_name, valuation, SUM(investment_value) AS total_investment_value FROM project_fundraising_r...
You are an expert in writing database language. You can write a corresponding 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...
[ { "content": "Show me all pairs of cases led by the same lawyer, including both case names and the lead lawyer ID.", "role": "user", "sql": null }, { "content": "SELECT c1.lead_lawyer_id,\n c1.case_name AS case_name_1,\n c2.case_name AS case_name_2\nFROM legal_services.cases c1\nJOIN...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.users ( user_id character varying(64) NOT NULL, username character ...
[ { "content": "Show all peers, listing their ID, IP address, and port.", "role": "user", "sql": null }, { "content": "SELECT peer_id, ip_address, port FROM trading_platform.peers;", "role": "assistant", "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 PRIMARY KEY, username text, email text, p...
[ { "content": "List players who have completed at least one game session with a score greater than 100, showing their player_id and username.", "role": "user", "sql": null }, { "content": "SELECT DISTINCT T1.player_id, T1.username FROM gaming_technology.players AS T1 JOIN gaming_technology.game_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 smart_money_token_performance ( token_address character varying(100) NOT NULL, token...
[ { "content": "Show the tokens with a negative net flow this month on all chains.", "role": "user", "sql": null }, { "content": "SELECT token_symbol, chain, net_flow FROM smart_money_token_performance WHERE net_flow < 0 AND date_trunc('month', CURRENT_DATE) = date_trunc('month', now());", "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 financial_services.customers ( customer_id text, first_name text, last_name text, da...
[ { "content": "List all customers in California ('CA'). Show their full name, city, and date of birth.", "role": "user", "sql": null }, { "content": "SELECT first_name, last_name, city, date_of_birth FROM financial_services.customers WHERE state = 'CA'", "role": "assistant", "sql": null ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.claims ( claim_id character varying(64) NOT NULL, -- unique identifier...
[ { "content": "Show the number of claims filed for each distinct status, ordered by the count in descending order.", "role": "user", "sql": null }, { "content": "SELECT status, COUNT(*) AS claim_count\nFROM insurance.claims\nGROUP BY status\nORDER BY claim_count DESC;", "role": "assistant", ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id text PRIMARY KEY, license_plate text, vin text,...
[ { "content": "Provide each trip's ID, vehicle license plate, driver's full name, origin city, and destination city.", "role": "user", "sql": null }, { "content": "SELECT t.trip_id,\n v.license_plate,\n CONCAT(d.first_name, ' ', d.last_name) AS driver_name,\n lo.city AS origin_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 token_metas ( block_timestamp timestamp(6) NOT NULL, block_number bigint NOT NULL, t...
[ { "content": "List all NFT collections on the 'Ethereum' blockchain. Show their name and contract address from the collections table.", "role": "user", "sql": null }, { "content": "SELECT name, contract_address FROM nft_collections WHERE blockchain = 'Ethereum';", "role": "assistant", "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.in_game_items ( item_id uuid NOT NULL DEFAULT gen_random_uuid(), g...
[ { "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": "user", "sql": null }, { "content": "SELECT a.game_id,\n a.item_name AS epic_item,\n b.item_name AS le...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.contracts ( contract_id.text, address.text, abi.text, bytecode.text, deployer_a...
[ { "content": "List the transaction IDs that have both an event and a token transfer, along with the name of the event and the value of the token transfer.", "role": "user", "sql": null }, { "content": "SELECT T1.transaction_id, T1.event_name, T2.value FROM web3.events AS T1 JOIN web3.token_trans...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.policies ( policy_id character varying(64) NOT NULL, customer_id character...
[ { "content": "Find all active policies with a coverage limit of at least 1,000,000. List the policy_id, policy_number, and coverage_limit.", "role": "user", "sql": null }, { "content": "SELECT policy_id, policy_number, coverage_limit\nFROM insurance.policies\nWHERE status = 'active' AND coverage...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id.text, license_plate.text, vin.text, make.text, ...
[ { "content": "I need the average capacity of vehicles for each fuel_type.", "role": "user", "sql": null }, { "content": "SELECT fuel_type,\n AVG(capacity) AS avg_capacity\nFROM transportation.vehicles\nGROUP BY fuel_type;", "role": "assistant", "sql": null }, { "content": "...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.citizens ( citizen_id character varying(64) NOT NULL, -- un...
[ { "content": "Retrieve the name and description of services offered by agencies in the 'Federal' jurisdiction.", "role": "user", "sql": null }, { "content": "SELECT T1.service_name, T1.description FROM government_services.services AS T1 JOIN government_services.agencies AS T2 ON T1.agency_id = T...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.likes ( like_id character varying(64) NOT NULL, -- unique identifie...
[ { "content": "Count the total number of likes on posts versus likes on comments across the entire platform.", "role": "user", "sql": null }, { "content": "SELECT CASE WHEN post_id IS NOT NULL THEN 'post' ELSE 'comment' END AS like_target, COUNT(*) AS total_likes FROM social_media.likes GROUP 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 legal_services.invoices ( invoice_id text, invoice_number text, client_id text, case...
[ { "content": "Show me all invoices with their invoice number, client ID, and total amount, along with the issue and due dates. Only include invoices where the total amount is at least 10,000.", "role": "user", "sql": null }, { "content": "SELECT invoice_number, client_id, total_amount, issue_dat...
You are an expert in writing database language. You can write a corresponding 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...
[ { "content": "List all hashtags and for each, show how many different users have created posts using that hashtag.", "role": "user", "sql": null }, { "content": "SELECT ph.hashtag_id, COUNT(DISTINCT p.user_id) AS unique_user_count\nFROM social_media.post_hashtags ph\nJOIN social_media.posts p ON...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.appointments ( appointment_id.text, client_id.text, lawyer_id.text, c...
[ { "content": "How many appointments were created in the month of July 2024?", "role": "user", "sql": null }, { "content": "SELECT COUNT(*) AS appointment_count\nFROM legal_services.appointments\nWHERE DATE_TRUNC('month', created_at) = DATE '2024-07-01';", "role": "assistant", "sql": null...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.drivers ( driver_id text PRIMARY KEY, employee_id text, first_name te...
[ { "content": "For each driver status, find the earliest and latest hire date. Show status, earliest hire date, and latest hire date.", "role": "user", "sql": null }, { "content": "SELECT\n status,\n MIN(hire_date) AS earliest_hire_date,\n MAX(hire_date) AS latest_hire_date\nFROM 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 healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birt...
[ { "content": "Find all patients along with the number of unique diagnoses each has received. Only include patients who have at least two diagnoses.", "role": "user", "sql": null }, { "content": "SELECT p.patient_id, p.first_name, p.last_name, COUNT(DISTINCT d.diagnosis_id) AS num_diagnoses\nFROM...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE blockchain.transactions ( transaction_id.text, block_id.text, sender_address.text, r...
[ { "content": "Which nodes have not been seen in the last 24 hours?", "role": "user", "sql": null }, { "content": "SELECT node_id, ip_address, port, last_seen\nFROM blockchain.nodes\nWHERE last_seen < now() - INTERVAL '24 hours';", "role": "assistant", "sql": null }, { "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 healthcare.appointments ( appointment_id text, patient_id text, doctor_id text, appo...
[ { "content": "Show me prescriptions with a route of 'Intravenous' and a frequency of 'Once Daily'. I need the prescription ID, medication ID, route, and frequency.", "role": "user", "sql": null }, { "content": "SELECT prescription_id , medication_id , route , frequency FROM healthcare.prescri...
You are an expert in writing database language. You can write a corresponding 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, first_name charac...
[ { "content": "List all lawyers who were hired before the year 2020 and are partners. Show their full name (first and last name combined), bar number, and hire date. Order the results by hire date.", "role": "user", "sql": null }, { "content": "SELECT first_name || ' ' || last_name AS full_name, ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.appointments ( appointment_id text PRIMARY KEY, client_id text, lawye...
[ { "content": "List each appointment along with the start_time of the next appointment for the same lawyer. Include appointment_id and next_start_time.", "role": "user", "sql": null }, { "content": "SELECT appointment_id,\n LEAD(start_time) OVER (PARTITION BY lawyer_id ORDER BY start_time) ...
You are an expert in writing database language. You can write a corresponding 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,...
[ { "content": "Which five license states have the highest count of active agents? Return the license_state and agent_count.", "role": "user", "sql": null }, { "content": "SELECT license_state,\n COUNT(*) AS agent_count\nFROM insurance.agents\nWHERE status = 'Active'\nGROUP BY license_state\...
You are an expert in writing database language. You can write a corresponding 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...
[ { "content": "What is the total USD value of tokens held by 'Binance' on the 'BSC' chain according to the latest snapshot?", "role": "user", "sql": null }, { "content": "SELECT SUM(usd_value) FROM cex_token_balance WHERE exchange = 'Binance' AND chain = 'BSC' AND snapshot_time = (SELECT MAX(snap...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.users ( user_id character varying(64) NOT NULL, username character ...
[ { "content": "For each asset, show its name and the number of metadata entries associated with it, including assets with zero metadata, sorted by asset name ascending.", "role": "user", "sql": null }, { "content": "SELECT a.name, COUNT(m.metadata_id) AS metadata_count\nFROM trading_platform.asse...
You are an expert in writing database language. You can write a corresponding 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...
[ { "content": "List all SUI coins with status 'exists', including their coin_type, balance, and owner address.", "role": "user", "sql": null }, { "content": "SELECT object_id, coin_type, balance, owner\nFROM sui_coins\nWHERE status = 'exists';", "role": "assistant", "sql": null }, { ...
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...
[ { "content": "What is the current operational status of the train car with car_id 'CAR123'?", "role": "user", "sql": null }, { "content": "I'm sorry, but I can't provide information on the current operational status of the train car with car_id 'CAR123'. The data in the train_cars table does not...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.rooms ( room_id character varying(64) NOT NULL, -- uniqu...
[ { "content": "List all rooms that have not been cleaned in the last 7 days, showing their room number, property ID, and last cleaned date.", "role": "user", "sql": null }, { "content": "SELECT room_number, property_id, last_cleaned_at FROM hospitality_technology.rooms WHERE last_cleaned_at < NOW...
You are an expert in writing database language. You can write a corresponding 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...
[ { "content": "List all posts created by user 'U100' in March 2024.", "role": "user", "sql": null }, { "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": "assistant", ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash varch...
[ { "content": "List the top 5 Avalanche tokens by total transfer volume in token_activities_avalanche.", "role": "user", "sql": null }, { "content": "SELECT tick, SUM(amt) AS total_volume\nFROM token_activities_avalanche\nGROUP BY tick\nORDER BY total_volume DESC\nLIMIT 5;", "role": "assistan...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.customers ( customer_id text PRIMARY KEY, first_name text, last_name text,...
[ { "content": "Show the policy number, start date, and the first and last name of the agent for all policies that started in 2024.", "role": "user", "sql": null }, { "content": "SELECT p.policy_number, p.start_date, a.first_name AS agent_first_name, a.last_name AS agent_last_name\nFROM insurance....
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.rooms ( room_id.text, property_id.text, room_number.text, roo...
[ { "content": "List all rooms that have a 'Jacuzzi' feature, including the room_number, property_id, type_name, and base_rate.", "role": "user", "sql": null }, { "content": "SELECT r.room_number,\n r.property_id,\n rt.type_name,\n rt.base_rate\nFROM hospitality_technology.rooms ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.customers ( customer_id text PRIMARY KEY, first_name text, last_name text,...
[ { "content": "List all addresses (address_line1, city, state) where more than one customer resides, and show how many customers share each address.", "role": "user", "sql": null }, { "content": "SELECT address_line1,\n city,\n state,\n COUNT(*) AS resident_count\nFROM insurance...
You are an expert in writing database language. You can write a corresponding 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...
[ { "content": "List all citizens who registered in the last 90 days but haven't scheduled any appointments. Display their citizen_id, full name, and registration_date.", "role": "user", "sql": null }, { "content": "SELECT c.citizen_id,\n c.first_name || ' ' || c.last_name AS full_name,\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.doctors ( doctor_id character varying(64) NOT NULL, -- unique identi...
[ { "content": "List the description and diagnosis date for all diagnoses that are marked as chronic and were made in the year 2023.", "role": "user", "sql": null }, { "content": "SELECT description, diagnosis_date FROM healthcare.diagnoses WHERE is_chronic = true AND diagnosis_date BETWEEN '2023-...
You are an expert in writing database language. You can write a corresponding 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, agency_i...
[ { "content": "List the names of employees whose job title is the same as their manager's job title. Include the employee's first name, last name, their manager's first name, last name, and their shared job title.", "role": "user", "sql": null }, { "content": "SELECT T1.first_name , T1.last_name...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.users ( user_id character varying(64) NOT NULL, username character ...
[ { "content": "List all users who have had their KYC status changed from 'approved' to 'rejected', along with the timestamps of both audits.", "role": "user", "sql": null }, { "content": "SELECT a.user_id, a.reviewed_at AS approved_time, r.reviewed_at AS rejected_time FROM trading_platform.kyc_au...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE financial_services.customers ( customer_id.text, first_name.text, last_name.text, da...
[ { "content": "Show the total sum and average amount for all OUTGOING transactions within the last 30 days, grouped by transaction_type.", "role": "user", "sql": null }, { "content": "SELECT transaction_type, SUM(amount) AS total_amount, AVG(amount) AS avg_amount FROM financial_services.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 transportation.trips ( trip_id character varying(64) NOT NULL, route_id character va...
[ { "content": "Show me the total number of passengers transported by each vehicle in the last week, along with the vehicle ID.", "role": "user", "sql": null }, { "content": "SELECT vehicle_id, SUM(passenger_count) AS total_passengers FROM transportation.trips WHERE status = 'completed' AND actual...
You are an expert in writing database language. You can write a corresponding 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...
[ { "content": "For each user, count the number of events emitted by smart contracts they deployed. Return user_id, username, and event_count, ordered by event_count descending.", "role": "user", "sql": null }, { "content": "SELECT u.user_id,\n u.username,\n COUNT(e.event_id) AS event_...
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, case_number text UNIQUE, case_name ...
[ { "content": "List all 'Evidence' documents uploaded in the last 30 days, including document_name, case_number, case_name, and upload_timestamp.", "role": "user", "sql": null }, { "content": "SELECT d.document_name, c.case_number, c.case_name, d.upload_timestamp\nFROM legal_services.documents 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 gaming_technology.in_game_items ( item_id uuid, game_id uuid, item_name text, item_t...
[ { "content": "Can you show me the number of unique item types and the average cost amount for each game?", "role": "user", "sql": null }, { "content": "SELECT game_id, COUNT(DISTINCT item_type) AS unique_item_types, AVG(cost_amount) AS avg_cost_amount FROM gaming_technology.in_game_items GROUP B...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.users ( user_id character varying(64) NOT NULL, username character ...
[ { "content": "Show each user's username along with their total traded value as buyers and their total traded value as sellers for trades executed in June 2024.", "role": "user", "sql": null }, { "content": "SELECT u.username,\n COALESCE(buy_tot.buy_value, 0) AS buyer_value,\n COALESC...
You are an expert in writing database language. You can write a corresponding 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...
[ { "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.", "role": "user", "sql": null }, { "content": "SELECT uploaded_by, document_type, COUNT(*) AS document_coun...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.fuel_logs ( fuel_log_id character varying(64) NOT NULL, -- uniqu...
[ { "content": "For each trip, provide the trip_id, the total fuel quantity refueled, and the number of refueling events that occurred during the trip.", "role": "user", "sql": null }, { "content": "SELECT trip_id, SUM(quantity) AS total_fuel_quantity, COUNT(*) AS refuel_event_count\nFROM transpor...
You are an expert in writing database language. You can write a corresponding 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(), -...
[ { "content": "I'd like a list of all games, displaying game title, developer name, and total number of achievements for each game.", "role": "user", "sql": null }, { "content": "SELECT g.title, d.name AS developer_name, COUNT(a.achievement_id) AS total_achievements\nFROM gaming_technology.games ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.documents ( document_id character varying(64) NOT NULL, applicat...
[ { "content": "Show me all documents and the appointments scheduled by the same citizen. List the document ID, upload timestamp, document type, the corresponding appointment ID, and its scheduled start time.", "role": "user", "sql": null }, { "content": "SELECT T1.document_id, T1.upload_timestamp...
You are an expert in writing database language. You can write a corresponding 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...
[ { "content": "Count the number of users whose location is 'London'.", "role": "user", "sql": null }, { "content": "SELECT count(*) FROM social_media.users WHERE location = 'London';", "role": "assistant", "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(), usern...
[ { "content": "For each player and game pair, please show the total number of achievements unlocked by the player in that game.", "role": "user", "sql": null }, { "content": "SELECT gs.player_id, gs.game_id, COUNT(pa.achievement_id) AS achievements_unlocked\nFROM gaming_technology.game_sessions g...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.lawyers ( lawyer_id character varying(64) NOT NULL, -- unique id...
[ { "content": "Show me a list of all partners who were hired in 2021.", "role": "user", "sql": null }, { "content": "SELECT lawyer_id,\n first_name,\n last_name,\n hire_date\nFROM legal_services.lawyers\nWHERE is_partner = true\n AND hire_date BETWEEN '2021-01-01' AND '2021-12-...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.drivers ( driver_id text, employee_id text, first_name text, last_nam...
[ { "content": "Find all pairs of drivers who were hired on the same date. For each pair, show the first_name and last_name of both drivers as driver1_first, driver1_last, driver2_first, driver2_last, and their shared hire_date.", "role": "user", "sql": null }, { "content": "SELECT d1.first_name 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 gaming_technology.games ( game_id.uuid, title.text, developer_id.uuid, publisher_id....
[ { "content": "List all games released in 2023 along with their titles, platforms, and the names of their developers.", "role": "user", "sql": null }, { "content": "SELECT g.game_id, g.title, g.platform, d.name AS developer_name\nFROM gaming_technology.games g\nJOIN gaming_technology.developers 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 social_media.posts ( post_id.text, user_id.text, content.text, media_url.text, media...
[ { "content": "List each user along with how many image-type posts they've made, showing user_id and image_post_count, sorted by the count descending.", "role": "user", "sql": null }, { "content": "SELECT user_id, COUNT(*) AS image_post_count\nFROM social_media.posts\nWHERE media_type = 'image'\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 blockchain.transactions ( transaction_id character varying(64) NOT NULL, -- uni...
[ { "content": "Show me transactions where the sender and receiver addresses are the same. List transaction_id, amount, and timestamp.", "role": "user", "sql": null }, { "content": "SELECT transaction_id, amount, timestamp FROM blockchain.transactions WHERE sender_address = receiver_address;", ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id character varying(64) NOT NULL, -- unique ...
[ { "content": "List all passengers with their first name, last name, and email.", "role": "user", "sql": null }, { "content": "SELECT first_name, last_name, email FROM transportation.passengers;", "role": "assistant", "sql": null }, { "content": "Can you also include their phone 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.routes ( route_id text, route_number text, description text, origin_l...
[ { "content": "Can you list all route numbers and their corresponding distance in km for routes that start in 'San Francisco'?", "role": "user", "sql": null }, { "content": "SELECT r.route_number, r.distance_km\nFROM transportation.routes r\nJOIN transportation.locations l ON r.origin_location_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 government_services.citizens ( citizen_id character varying(64) NOT NULL, -- un...
[ { "content": "Provide a count of appointments grouped by their current status.", "role": "user", "sql": null }, { "content": "SELECT status, COUNT(*) FROM government_services.appointments GROUP BY status;", "role": "assistant", "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...
[ { "content": "I want to see the number of 'buy' and 'sell' orders for each asset, along with the asset_id.", "role": "user", "sql": null }, { "content": "SELECT asset_id, order_type, COUNT(*) AS order_count FROM trading_platform.orders GROUP BY asset_id, order_type;", "role": "assistant", ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash text,...
[ { "content": "Show the symbol, name, and total supply for all SUI coins with status 'active'.", "role": "user", "sql": null }, { "content": "SELECT scm.symbol, scm.name, scm.coin_type, scm.total_supply\nFROM sui_coins_metadata scm\nWHERE scm.status = 'active';", "role": "assistant", "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 insurance.insurance_products ( product_id character varying(64) NOT NULL, product_na...
[ { "content": "Show product_id, product_name, and base_premium for the five most recently created active insurance products.", "role": "user", "sql": null }, { "content": "SELECT product_id, product_name, base_premium\nFROM insurance.insurance_products\nWHERE is_active = true\nORDER BY 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 legal_services.lawyers ( lawyer_id character varying(64) NOT NULL, -- unique id...
[ { "content": "List all time entries for lawyers specializing in 'Criminal Law'. Show the entry ID, the date worked, hours spent, and the first and last name of the lawyer who performed the work.", "role": "user", "sql": null }, { "content": "SELECT te.entry_id, te.date_worked, te.hours_spent, l....
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.lawyers ( lawyer_id.text, first_name.text, last_name.text, bar_number...
[ { "content": "List the first name, last name, and specialization of all lawyers who have uploaded at least one document.", "role": "user", "sql": null }, { "content": "SELECT T1.first_name, T1.last_name, T1.specialization FROM legal_services.lawyers AS T1 JOIN legal_services.documents AS T2 ON T...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.bookings ( booking_id.text, passenger_id.text, trip_id.text, seat_num...
[ { "content": "What are the average and maximum fare amounts for each booking status?", "role": "user", "sql": null }, { "content": "SELECT status, AVG(fare) AS avg_fare, MAX(fare) AS max_fare\nFROM transportation.bookings\nGROUP BY status;", "role": "assistant", "sql": null }, { ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE financial_services.loans ( loan_id character varying(64) NOT NULL, -- unique ide...
[ { "content": "I need a report that shows, for each account status and loan type, how many loans there are and the average principal amount.", "role": "user", "sql": null }, { "content": "SELECT a.status,\n l.loan_type,\n COUNT(*) AS total_loans,\n AVG(l.principal_amount) AS ave...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.diagnoses ( diagnosis_id character varying(64) NOT NULL, record_id charac...
[ { "content": "List every diagnosis description paired with every insurance plan's website.", "role": "user", "sql": null }, { "content": "SELECT T1.description, T2.website FROM healthcare.diagnoses AS T1 CROSS JOIN healthcare.insurance_plans AS T2;", "role": "assistant", "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 smart_money_profit ( address text, rank numeric, profit numeric, roi numeric, realiz...
[ { "content": "List smart money addresses on the 'Arbitrum' chain with a realized ratio between 0.5 and 0.8 and positive profit. Show address, profit, and realized_ratio.", "role": "user", "sql": null }, { "content": "SELECT address, profit, realized_ratio FROM smart_money_profit WHERE chain = '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 gaming_technology.games ( game_id uuid PRIMARY KEY, title text, developer_id uuid, p...
[ { "content": "List game titles and their developer names for games released in 2023 or later.", "role": "user", "sql": "SELECT T1.title , T2.name FROM gaming_technology.games AS T1 JOIN gaming_technology.developers AS T2 ON T1.developer_id = T2.developer_id WHERE T1.release_date >= '2023-01-01'" }, ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.lawyers ( lawyer_id text, first_name text, last_name text, bar_number...
[ { "content": "Show me each lawyer along with the names of documents they have uploaded.", "role": "user", "sql": null }, { "content": "SELECT l.first_name || ' ' || l.last_name AS lawyer_name,\n d.document_name\nFROM legal_services.lawyers l\nLEFT JOIN legal_services.documents d\n ON l.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 healthcare.patients ( patient_id character varying(64) NOT NULL, -- unique iden...
[ { "content": "Show me all patients who have had at least one appointment with a doctor specializing in 'Cardiology'. Include the patient's full name, appointment time, and doctor's full name.", "role": "user", "sql": null }, { "content": "SELECT p.patient_id, p.first_name AS patient_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 web3.contracts ( contract_id character varying(64) NOT NULL, -- unique identifi...
[ { "content": "For each distinct deployer address, how many contracts have they deployed and what is the most recent deployment time? Please show deployer_address, contract_count, and latest_deployed_at.", "role": "user", "sql": null }, { "content": "SELECT deployer_address, COUNT(*) AS contract_...
You are an expert in writing database language. You can write a corresponding 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...
[ { "content": "List the case name, case number, and date opened for all cases with a status of 'Pending'.", "role": "user", "sql": null }, { "content": "SELECT case_name, case_number, date_opened FROM legal_services.cases WHERE status = 'Pending';", "role": "assistant", "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(), -...
[ { "content": "For each player and game, how many achievements has the player unlocked? Display the player's username, the game title, and the number of achievements unlocked.", "role": "user", "sql": null }, { "content": "SELECT p.username, g.title, COUNT(pa.player_achievement_id) AS unlocked_co...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.comments ( comment_id character varying(64) NOT NULL, -- unique ide...
[ { "content": "List the usernames of users who have commented on posts that are not replies to other comments.", "role": "user", "sql": null }, { "content": "SELECT DISTINCT T2.username FROM social_media.comments AS T1 JOIN social_media.users AS T2 ON T1.user_id = T2.user_id WHERE T1.parent_comme...
You are an expert in writing database language. You can write a corresponding 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...
[ { "content": "Find cases where an address received tokens in one transfer and then sent tokens in another. List the receive transfer_id, the send transfer_id, the address, and both transfer values.", "role": "user", "sql": null }, { "content": "SELECT recv.transfer_id AS receive_transfer_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.contracts ( contract_id character varying(64) NOT NULL, address character varyi...
[ { "content": "Find the wallet address, user ID, and the contract address of any contract where that wallet is listed as the deployer.", "role": "user", "sql": null }, { "content": "SELECT w.address AS wallet_address, w.user_id, c.address AS contract_address\nFROM web3.wallets w\nJOIN web3.contra...
You are an expert in writing database language. You can write a corresponding 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...
[ { "content": "List all conversation participants along with post_hashtag details where the participant's user_id matches the hashtag_id.", "role": "user", "sql": null }, { "content": "SELECT cp.conversation_id, cp.user_id, ph.post_id, ph.hashtag_id\nFROM social_media.conversation_participants cp...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id text PRIMARY KEY, license_plate text, vin text,...
[ { "content": "For each route, show the route number and the total number of trips associated with it.", "role": "user", "sql": null }, { "content": "SELECT T2.route_number, count(T1.trip_id) FROM transportation.trips AS T1 JOIN transportation.routes AS T2 ON T1.route_id = T2.route_id GROUP BY T2...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.users ( user_id.text, username.text, email.text, password_hash.text, fu...
[ { "content": "Show me the usernames of all verified users who have liked any comment and the like creation time.", "role": "user", "sql": null }, { "content": "SELECT u.username, l.created_at\nFROM social_media.likes l\nJOIN social_media.users u ON l.user_id = u.user_id\nWHERE l.comment_id IS NO...
You are an expert in writing database language. You can write a corresponding 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...
[ { "content": "Show all routes where the estimated duration is at least 120 minutes including their route number, type, and origin and destination location IDs.", "role": "user", "sql": null }, { "content": "SELECT route_number, type, origin_location_id, destination_location_id\nFROM transportati...
You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, -- uni...
[ { "content": "Find the names of services and the locations where appointments have been scheduled for them.", "role": "user", "sql": null }, { "content": "SELECT T1.service_name, T2.location_name FROM services AS T1 JOIN appointments AS T3 ON T1.service_id = T3.service_id JOIN service_locations ...
You are an expert in writing database language. You can write a corresponding 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...
[ { "content": "For each policy, find its immediate predecessor policy for the same customer. Return customer_id, predecessor policy_number, current policy_number, predecessor end_date, and current start_date.", "role": "user", "sql": null }, { "content": "WITH ranked AS (\n SELECT p2.customer_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 government_services.payments ( payment_id.text, application_id.text, citizen_id.text...
[ { "content": "For each service ID, show the average and maximum payment amount for payments made in the last 90 days.", "role": "user", "sql": null }, { "content": "SELECT service_id, AVG(amount), MAX(amount) FROM government_services.payments WHERE payment_timestamp >= NOW() - INTERVAL '90 days'...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.kyc_audit ( kyc_audit_id character varying(64) NOT NULL, -- un...
[ { "content": "Show me the top 5 users with the most KYC audits, along with their latest audit status.", "role": "user", "sql": null }, { "content": "SELECT user_id, status, COUNT(*) as audit_count FROM trading_platform.kyc_audit GROUP BY user_id, status ORDER BY audit_count DESC LIMIT 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 financial_services.securities ( security_id text, ticker_symbol text, isin_code text...
[ { "content": "For each security, find any other security within the same sector that has a later last_updated timestamp. Return a.ticker_symbol, b.ticker_symbol, and b.last_updated.", "role": "user", "sql": null }, { "content": "SELECT a.ticker_symbol AS symbol_a, b.ticker_symbol AS symbol_b, b....
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE financial_services.accounts ( account_id text, customer_id text, account_number text...
[ { "content": "For each trade in the past 14 days, show the trade_id, account_id, security_id, and the latest close_price for that security from market_data.", "role": "user", "sql": null }, { "content": "SELECT tr.trade_id, tr.account_id, tr.security_id, md.close_price AS latest_close_price, md....
You are an expert in writing database language. You can write a corresponding 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...
[ { "content": "Show the total and average balance for each account_type.", "role": "user", "sql": null }, { "content": "SELECT account_type, SUM(balance) AS total_balance, AVG(balance) AS avg_balance FROM financial_services.accounts GROUP BY account_type;", "role": "assistant", "sql": nul...
You are an expert in writing database language. You can write 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 'aircraft_models'. Mapping: { properties: { model_id: { type: 'keyword' }, model_name: { ty...
[ { "content": "Can you help me fetch all inspection records for components associated with a specific aircraft build, along with the component names and inspection results?", "role": "user", "sql": null }, { "content": "SELECT i.inspection_id, i.build_id, i.component_id, c.component_name, i.inspe...
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, first_name text, last_name text, agenc...
[ { "content": "List all agents and their managers' full names.", "role": "user", "sql": null }, { "content": "SELECT a.first_name, a.last_name, m.first_name AS manager_first_name, m.last_name AS manager_last_name FROM insurance.agents a LEFT JOIN insurance.agents m ON a.manager_id = m.agent_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.players ( player_id uuid, username text, email text, password_hash...
[ { "content": "Can you list each developer's name along with the number of games they have published by joining developers and games?", "role": "user", "sql": null }, { "content": "SELECT d.name AS developer_name,\n COUNT(g.game_id) AS games_published\nFROM gaming_technology.developers d\nL...
You are an expert in writing database language. You can write a corresponding 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...
[ { "content": "Show all maintenance logs with the vehicle ID, service date, service type, and the name and city of the location where the vehicle's most recent fueling occurred.", "role": "user", "sql": null }, { "content": "SELECT ml.log_id, ml.vehicle_id, ml.service_date, ml.service_type, loc.n...