system
stringlengths
315
8.44k
conversations
listlengths
2
8
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.payments ( payment_id character varying(64) NOT NULL, reserva...
[ { "role": "user", "content": "Show me all payments made using the 'CreditCard' method in USD, including payment_id, amount, and payment_timestamp.", "sql": null }, { "role": "assistant", "content": "SELECT payment_id, amount, payment_timestamp\nFROM hospitality_technology.payments\nWHERE pay...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.users ( user_id character varying(64) NOT NULL, -- unique iden...
[ { "role": "user", "content": "For each asset, I want to know how many orders have the status 'filled', showing the asset symbol.", "sql": null }, { "role": "assistant", "content": "SELECT m.value AS asset_symbol,\n COUNT(*) AS filled_order_count\nFROM trading_platform.orders o\nJOIN tr...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.insurance_products ( product_id text, product_name text, product_type text...
[ { "role": "user", "content": "List the name and type for all insurance products with a base premium over 5000.", "sql": null }, { "role": "assistant", "content": "SELECT product_name, product_type FROM insurance.insurance_products WHERE base_premium > 5000;", "sql": null }, { "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 gaming_technology.games ( game_id uuid PRIMARY KEY, title text, developer_id uuid, p...
[ { "role": "user", "content": "List all in-game items that are either 'Rare' or 'Epic' rarity.", "sql": "SELECT item_id , item_name , rarity FROM in_game_items WHERE rarity = 'Rare' OR rarity = 'Epic'" }, { "role": "assistant", "content": "SELECT item_id, item_name, rarity FROM in_game_items ...
You are an expert in writing database language. You can write a corresponding 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, -- unique id...
[ { "role": "user", "content": "List the names of all clients that are associated with cases led by lawyers specializing in 'Intellectual Property'.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT c.first_name, c.last_name\nFROM legal_services.cases cs\nJOIN legal_services....
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.likes ( like_id.text, user_id.text, post_id.text, comment_id.text, crea...
[ { "role": "user", "content": "List all likes made by user 'U100' on posts, including the like_id and the post_id.", "sql": null }, { "role": "assistant", "content": "SELECT like_id, post_id FROM social_media.likes WHERE user_id = 'U100' AND post_id IS NOT NULL;", "sql": null }, { ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.patients ( patient_id character varying(64) NOT NULL, first_name characte...
[ { "role": "user", "content": "Find pairs of patients where patient A's emergency contact phone matches patient B's phone number, and patient B's emergency contact phone matches patient A's phone number. Include both patient IDs, their full names, patient A's phone, and patient B's phone.", "sql": null ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE financial_services.securities ( security_id character varying(64) NOT NULL, -- u...
[ { "role": "user", "content": "For each sector, retrieve the ticker symbol and last_updated timestamp of the earliest and latest updated securities, labeling them as earliest_ticker, earliest_updated, latest_ticker, and latest_updated.", "sql": null }, { "role": "assistant", "content": "WITH ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.service_locations ( location_id character varying(64) NOT NULL, ...
[ { "role": "user", "content": "I want to know the total number of appointments per location along with the location name for appointments scheduled in March 2024.", "sql": null }, { "role": "assistant", "content": "SELECT\n sl.location_name,\n COUNT(a.appointment_id) AS appointment_count\nF...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE financial_services.customers ( customer_id text PRIMARY KEY, first_name text, last_n...
[ { "role": "user", "content": "I need a report showing each active customer's full name and email, along with the number of loans they have and the total principal amount across those loans.", "sql": null }, { "role": "assistant", "content": "SELECT c.first_name || ' ' || c.last_name AS full_...
You are an expert in writing database language. You can write a corresponding 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, agency_name.text, jurisdiction_level....
[ { "role": "user", "content": "Show the number of inactive services offered by agencies in each jurisdiction level.", "sql": null }, { "role": "assistant", "content": "SELECT a.jurisdiction_level, COUNT(s.service_id) FROM government_services.agencies a JOIN government_services.services s ON 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 legal_services.appointments ( appointment_id.text, client_id.text, lawyer_id.text, c...
[ { "role": "user", "content": "Find all pairs of appointments that are scheduled for the same case and overlap in time. Show the IDs of the two overlapping appointments and the shared case ID.", "sql": null }, { "role": "assistant", "content": "SELECT t1.appointment_id AS appointment1_id, 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 healthcare.insurance_plans ( plan_id.text, plan_name.text, insurance_provider.text, ...
[ { "role": "user", "content": "Count the total number of unique insurance providers in the system.", "sql": null }, { "role": "assistant", "content": "SELECT COUNT(DISTINCT insurance_provider) FROM healthcare.insurance_plans;", "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.developers ( developer_id.uuid, name.text, country.text, founded_y...
[ { "role": "user", "content": "Show me all servers and the total number of achievements available in the game they host. Include the server name and region.", "sql": null }, { "role": "assistant", "content": "SELECT s.server_name, s.region, COUNT(a.achievement_id) AS total_achievements\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 healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birt...
[ { "role": "user", "content": "Show me all male patients who have received more than one prescription, including their full name, date of birth, and the total number of prescriptions.", "sql": null }, { "role": "assistant", "content": "SELECT p.patient_id, p.first_name, p.last_name, p.date_of...
You are an expert in writing database language. You can write a corresponding 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 services are defined for each service category?", "sql": null }, { "role": "assistant", "content": "SELECT category, COUNT(*) AS service_count FROM government_services.services GROUP BY category;", "sql": null }, { "role": "user", "conte...
You are an expert in writing database language. You can write 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 'inspections'. Document structure: { _id: <ObjectId (or inspection_id)>, inspection_id...
[ { "role": "user", "content": "Can you help me retrieve all inspection records for a specific build ID, including the inspection type, result, and the timestamp of the inspection, along with the associated component ID if available?", "sql": null }, { "role": "assistant", "content": "db.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 hospitality_technology.rooms ( room_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "List all room numbers, their type names, and base rates for rooms located on floor 5.", "sql": null }, { "role": "assistant", "content": "SELECT T1.room_number, T2.type_name, T2.base_rate FROM hospitality_technology.rooms AS T1 JOIN hospitality_technology.room_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 hospitality_technology.service_orders ( order_id text PRIMARY KEY, reservation_id te...
[ { "role": "user", "content": "Show the total revenue and the average order value for each order status.", "sql": null }, { "role": "assistant", "content": "SELECT status, SUM(total_price) AS total_revenue, AVG(total_price) AS avg_order_value FROM hospitality_technology.service_orders 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 insurance.claims ( claim_id text PRIMARY KEY, policy_id text, customer_id text, inci...
[ { "role": "user", "content": "List all premium payments made via credit card in the last 30 days, showing their policy IDs and payment amounts.", "sql": null }, { "role": "assistant", "content": "SELECT policy_id, amount_paid FROM insurance.premium_payments WHERE payment_method = 'credit car...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE financial_services.loans ( loan_id.text, account_id.text, loan_type.text, principal_...
[ { "role": "user", "content": "What is the average interest rate for loans of type 'Mortgage'?", "sql": null }, { "role": "assistant", "content": "SELECT AVG(interest_rate) FROM financial_services.loans WHERE loan_type = 'Mortgage'", "sql": null }, { "role": "user", "content":...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.drivers ( driver_id character varying(64) NOT NULL, employee_id chara...
[ { "role": "user", "content": "List all routes where the origin and destination are in the same state, showing the route_number, state, origin city, destination city, distance_km, and type.", "sql": null }, { "role": "assistant", "content": "SELECT r.route_number, o.state_province AS state, o...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.medical_records ( record_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "Can you give me all medical records where the assessment field is not null and not empty?", "sql": null }, { "role": "assistant", "content": "SELECT record_id, patient_id, doctor_id, record_date, assessment FROM healthcare.medical_records WHERE assessment IS 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 token_metas ( block_timestamp timestamp(6) NOT NULL, block_number bigint NOT NULL, t...
[ { "role": "user", "content": "List all SUI coins, showing object ID, owner address, and balance.", "sql": null }, { "role": "assistant", "content": "SELECT object_id, owner, balance FROM sui_coins;", "sql": null }, { "role": "user", "content": "Include the coin symbol and 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 web3.token_transfers ( transfer_id text PRIMARY KEY, token_id text, from_address tex...
[ { "role": "user", "content": "List pairs of token transfers within the same transaction and for the same token_id where the transfer values are different. Show the transaction ID, token ID, and both transfer IDs and their values.", "sql": null }, { "role": "assistant", "content": "SELECT t1....
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE financial_services.accounts ( account_id text PRIMARY KEY, customer_id text, account...
[ { "role": "user", "content": "List all accounts with a balance below 1000, showing the account_id, account_number, and currency.", "sql": null }, { "role": "assistant", "content": "SELECT account_id, account_number, currency\nFROM financial_services.accounts\nWHERE balance < 1000;", "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 hospitality_technology.room_types ( room_type_id character varying(64) NOT NULL,...
[ { "role": "user", "content": "List all staff members hired in 2024, showing their first name, last name, and hire date.", "sql": null }, { "role": "assistant", "content": "SELECT first_name, last_name, hire_date FROM hospitality_technology.staff WHERE EXTRACT(YEAR FROM hire_date) = 2024", ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.users ( user_id character varying(64) NOT NULL, username character vary...
[ { "role": "user", "content": "List all comment IDs and their content for comments made by users who have 'dark' as their theme.", "sql": null }, { "role": "assistant", "content": "SELECT c.comment_id, c.content\nFROM social_media.comments c\nJOIN social_media.user_settings s ON c.user_id = 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 project_fundraising_record ( id.text, project_id.text, project_name.text, rounds_nam...
[ { "role": "user", "content": "What is the average project valuation for each round name in 2023?", "sql": null }, { "role": "assistant", "content": "SELECT rounds_name, AVG(valuation) AS avg_valuation\nFROM project_fundraising_record\nWHERE investment_date LIKE '2023-%'\nGROUP BY rounds_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 cex_token_balance ( snapshot_time.text, chain.text, address.text, exchange.text, tok...
[ { "role": "user", "content": "How many unique tokens are recorded for each chain in the latest snapshot in cex_token_balance?", "sql": null }, { "role": "assistant", "content": "WITH latest_snapshot AS (\n SELECT MAX(snapshot_time) AS max_time FROM cex_token_balance\n)\nSELECT \n chain, \n...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.customers ( customer_id character varying(64) NOT NULL, first_name charact...
[ { "role": "user", "content": "Show me the first and last names of all customers with policies having a premium amount greater than 3000, along with their policy number and policy status.", "sql": null }, { "role": "assistant", "content": "SELECT c.first_name, c.last_name, p.policy_number, 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 each wallet that has received tokens of more than one distinct token type. Show wallet_id, address, the number of distinct tokens received as distinct_token_count, and the total received value, ordered by total_received_value descending.", "sql": null }, { "rol...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE token_metas ( block_timestamp.timestamp, block_number.bigint, transaction_hash.text,...
[ { "role": "user", "content": "Which ERC20 tokens have more than 8 decimals? Show their symbol, name, and decimals.", "sql": null }, { "role": "assistant", "content": "SELECT symbol, name, decimals\nFROM token_metas\nWHERE is_erc20 = 1 AND decimals > 8;", "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 social_media.users ( user_id character varying(64) NOT NULL, username character vary...
[ { "role": "user", "content": "List the usernames, emails, and group names for users who have sent messages in group chats and have enabled email notifications.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT T1.username, T1.email, T4.group_name FROM social_media.users 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 erc1155_approval_for_all ( block_number bigint, block_timestamp timestamp, transacti...
[ { "role": "user", "content": "Can you list all SUI coins with 'active' status and their owner addresses and balances?", "sql": null }, { "role": "assistant", "content": "SELECT object_id, coin_type, owner, balance\nFROM sui_coins\nWHERE status = 'active';", "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 // Use Hashes to store station details. Key format: station:<station_id> // Example: // HSET stat...
[ { "role": "user", "content": "能否帮我统计特定车站(station_id 为 'station_xyz')的所有平台数量?", "sql": null }, { "role": "assistant", "content": "SCARD station:station_xyz:platforms", "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 train_station_management.train_cars ( car_id character varying(64) NOT NULL, -- ...
[ { "role": "user", "content": "Can you retrieve the total number of tickets sold for each car type?", "sql": null }, { "role": "assistant", "content": "SELECT tc.car_type, COUNT(t.ticket_id) AS total_tickets\nFROM train_station_management.train_cars tc\nJOIN train_station_management.tickets t...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.customers ( customer_id character varying(64) NOT NULL, first_name charact...
[ { "role": "user", "content": "Show all beneficiaries who were added in 2024 for any policy. List their beneficiary_id, first and last name, relationship, and the policy_id.", "sql": null }, { "role": "assistant", "content": "SELECT beneficiary_id, first_name, last_name, relationship, policy_...
You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "Find all pairs of overlapping payment periods for the same customer. Return customer_id, first payment_id as payment1_id, second payment_id as payment2_id, and both periods' start and end dates.", "sql": null }, { "role": "assistant", "content": "SELECT p1.custo...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.documents ( document_id.text, case_id.text, document_name.text, docum...
[ { "role": "user", "content": "How many documents has each lawyer uploaded? Return uploaded_by_lawyer_id and the count, only include lawyers with at least 3 documents, sorted by count descending.", "sql": null }, { "role": "assistant", "content": "SELECT uploaded_by_lawyer_id,\n COUNT(*...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.players ( player_id uuid PRIMARY KEY, username text, email text, p...
[ { "role": "user", "content": "Show me each achievement name and the number of players who have unlocked it.", "sql": null }, { "role": "assistant", "content": "SELECT a.name,\n COUNT(pa.player_id) AS unlock_count\nFROM gaming_technology.achievements a\nLEFT JOIN gaming_technology.playe...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.drivers ( driver_id text PRIMARY KEY, employee_id text, first_name te...
[ { "role": "user", "content": "For each booking, list the booking_id, trip_id, origin city, destination city, and fare.", "sql": null }, { "role": "assistant", "content": "SELECT b.booking_id, b.trip_id, lo.city AS origin_city, ld.city AS destination_city, b.fare\nFROM transportation.bookings...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.wallets ( wallet_id text, user_id text, address text, private_key text, created...
[ { "role": "user", "content": "List the user IDs who own more than one wallet and show how many wallets each of them has.", "sql": null }, { "role": "assistant", "content": "SELECT user_id, COUNT(*) FROM web3.wallets GROUP BY user_id HAVING COUNT(*) > 1;", "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 web3.contracts ( contract_id.text, address.text, abi.text, bytecode.text, deployer_a...
[ { "role": "user", "content": "Show me all contracts deployed on the 'ethereum' network along with their deployer addresses and the count of transactions they've been involved in, sorted by transaction count in descending order.", "sql": null }, { "role": "assistant", "content": "SELECT c.add...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.doctors ( doctor_id text, first_name text, last_name text, specialty text...
[ { "role": "user", "content": "Show me the first name, last name, and license number for all doctors whose specialty is 'Pediatrics'.", "sql": null }, { "role": "assistant", "content": "SELECT first_name, last_name, license_number FROM healthcare.doctors WHERE specialty = 'Pediatrics';", ...
You are an expert in writing database language. You can write a corresponding 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...
[ { "role": "user", "content": "Show me the latest uploaded document (name and version) for each invoice that is linked to a case, including the invoice number and total amount.", "sql": null }, { "role": "assistant", "content": "SELECT i.invoice_number, i.total_amount, d.document_name, d.vers...
You are an expert in writing database language. You can write a corresponding 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": "Retrieve the first and last names of all doctors who specialize in Cardiology.", "sql": null }, { "role": "assistant", "content": "SELECT first_name, last_name\nFROM healthcare.doctors\nWHERE specialty = 'Cardiology';", "sql": null } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.citizens ( citizen_id character varying(64) NOT NULL, national_i...
[ { "role": "user", "content": "Can you list the number of citizens registered each month in 2024? Please show the month and the citizen count.", "sql": null }, { "role": "assistant", "content": "SELECT TO_CHAR(registration_date, 'YYYY-MM') AS registration_month, COUNT(*) AS citizen_count FROM...
You are an expert in writing database language. You can write a corresponding 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...
[ { "role": "user", "content": "Provide every combination of medication name and insurance plan name.", "sql": null }, { "role": "assistant", "content": "SELECT m.medication_name, p.plan_name\nFROM healthcare.medications AS m\nCROSS JOIN healthcare.insurance_plans AS p;", "sql": null } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.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 web3.wallets ( wallet_id text PRIMARY KEY, user_id text, address text, private_key t...
[ { "role": "user", "content": "Find all users who have at least two wallets with different private keys. Show user_id and the count of distinct private keys for those users.", "sql": null }, { "role": "assistant", "content": "SELECT user_id, COUNT(DISTINCT private_key) AS distinct_private_key...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.events ( event_id.text, contract_id.text, event_name.text, data.text, emitted_a...
[ { "role": "user", "content": "For each user, list their username, the number of wallets they have, and the total gas used across all transactions they initiated.", "sql": null }, { "role": "assistant", "content": "SELECT u.username,\n COUNT(w.wallet_id) AS wallet_count,\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.policies ( policy_id text, customer_id text, product_id text, agent_id tex...
[ { "role": "user", "content": "I need to calculate the total premium and average deductible for each agent for policies issued this year.", "sql": null }, { "role": "assistant", "content": "SELECT agent_id,\n SUM(premium_amount) AS total_premium,\n AVG(deductible) 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 insurance.customers ( customer_id.text, first_name.text, last_name.text, date_of_bir...
[ { "role": "user", "content": "List all premium payments with status 'Completed', showing the payment ID, payment date, amount paid, and the first and last name of the customer who made the payment.", "sql": null }, { "role": "assistant", "content": "SELECT T1.payment_id, T1.payment_date, T1....
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE train_station_management.train_cars ( car_id character varying(64) NOT NULL, -- ...
[ { "role": "user", "content": "Can you help me get the total number of passenger cars for each train car type in the database?", "sql": null }, { "role": "assistant", "content": "SELECT car_type, COUNT(*) as total_cars\nFROM train_station_management.train_cars\nWHERE car_type = 'Passenger'\nG...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.users ( user_id.text, username.text, email.text, password_hash.text, fu...
[ { "role": "user", "content": "Get the five most recent public posts that have media_type = 'video', showing post_id, created_at, and the author's username.", "sql": null }, { "role": "assistant", "content": "SELECT\n p.post_id,\n p.created_at,\n u.username\nFROM social_media.posts p\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 web3.contracts ( contract_id text PRIMARY KEY, address text, abi text, bytecode text...
[ { "role": "user", "content": "List all failed transactions along with the from and to addresses, and the gas used.", "sql": null }, { "role": "assistant", "content": "SELECT transaction_id, from_address, to_address, gas_used FROM web3.transactions WHERE status = 'failed';", "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 hospitality_technology.rooms ( room_id text PRIMARY KEY, property_id text, room_numb...
[ { "role": "user", "content": "List the room_id, room_number, and current_condition for all rooms that have 'Jacuzzi' in their features.", "sql": null }, { "role": "assistant", "content": "SELECT room_id, room_number, current_condition\nFROM hospitality_technology.rooms\nWHERE features LIKE '...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.hashtags ( hashtag_id character varying(64) NOT NULL, tag_name characte...
[ { "role": "user", "content": "List all pairs of hashtags created on the same calendar date, showing both tag names and the creation date.", "sql": null }, { "role": "assistant", "content": "SELECT h1.tag_name AS tag1, h2.tag_name AS tag2, DATE(h1.created_at) AS created_date\nFROM social_medi...
You are an expert in writing database language. You can write a corresponding 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 appointments along with the patient's full name and the doctor's full name.", "sql": null }, { "role": "assistant", "content": "SELECT\n a.appointment_id,\n a.appointment_time,\n p.first_name AS patient_first_name,\n p.last_name AS patient_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 healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birt...
[ { "role": "user", "content": "List patient_id, full name, policy_number, plan_type, and insurance_provider for all active primary insurance policies.", "sql": null }, { "role": "assistant", "content": "SELECT pi.patient_id,\n p.first_name,\n p.last_name,\n pi.policy_number,...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.cases ( case_id.text, case_number.text, case_name.text, client_id.tex...
[ { "role": "user", "content": "List all case numbers, names, and types.", "sql": null }, { "role": "assistant", "content": "SELECT case_number, case_name, case_type FROM legal_services.cases;", "sql": null }, { "role": "user", "content": "Only include cases opened after 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.citizens ( citizen_id character varying(64) NOT NULL, -- un...
[ { "role": "user", "content": "List the first and last names of citizens who have made 'Completed' payments for services belonging to the 'Healthcare' category, along with the amount paid and the service name.", "sql": null }, { "role": "assistant", "content": "SELECT T1.first_name, T1.last_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": "Can you provide a list of all medical records created by doctors for patients who are associated with 'PPO' type insurance plans? I need the record ID, patient ID, doctor ID, record date, and insurance plan name.", "sql": null }, { "role": "assistant", "content"...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE blockchain.addresses ( address_id text PRIMARY KEY, public_key text, balance numeric...
[ { "role": "user", "content": "Find users whose username contains 'admin'.", "sql": null }, { "role": "assistant", "content": "SELECT user_id, username, email FROM blockchain.users WHERE username LIKE '%admin%';", "sql": null }, { "role": "user", "content": "For these users, 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 Node Label ':AircraftModel'. Properties: { model_id: String (Constraint: UNIQUE), model_name: Str...
[ { "role": "user", "content": "我想查询某个飞机型号的所有构建信息,包括构建的开始日期、预计完成日期以及所在的装配线名称和位置。", "sql": null }, { "role": "assistant", "content": "MATCH (am:AircraftModel)-[:IS_MODEL]-(ab:AircraftBuild)-[:ASSEMBLED_ON]->(al:AssemblyLine)\nWHERE am.model_id = 'specific_model_id'\nRETURN ab.build_id, ab.build...
You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, employee_id chara...
[ { "role": "user", "content": "Show me all active drivers whose license will expire in the next 60 days, including their full name and contact information.", "sql": null }, { "role": "assistant", "content": "SELECT driver_id, first_name, last_name, contact_number, email, license_expiry_date F...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE financial_services.trades ( trade_id.text, account_id.text, security_id.text, order_...
[ { "role": "user", "content": "Find pairs of trades that share the same order_id but have different trade_types.", "sql": null }, { "role": "assistant", "content": "SELECT a.order_id, a.trade_id AS trade_a, a.trade_type AS type_a, b.trade_id AS trade_b, b.trade_type AS type_b\nFROM financial_...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.citizens ( citizen_id text, national_id_number text, first_name ...
[ { "role": "user", "content": "Retrieve each gender and the count of verified citizens born before 1990.", "sql": null }, { "role": "assistant", "content": "SELECT gender,\n COUNT(*) AS citizen_count\nFROM government_services.citizens\nWHERE is_verified = TRUE\n AND date_of_birth < '19...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure // Use Hashes for ticket details. Key format: ticket:<ticket_id> // HSET ticket:tkt_1a2b ticket_i...
[ { "role": "user", "content": "特定の列車ID 'train_789' に関連するすべてのメンテナンス記録の詳細を取得するのを手伝っていただけますか?", "sql": null }, { "role": "assistant", "content": "SMEMBERS train:train_789:maintenance\nHGETALL maintenance_record:<record_id>", "sql": null } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.user_settings ( setting_id.text, user_id.text, theme.text, email_notifi...
[ { "role": "user", "content": "Count the total number of users who have enabled email notifications but disabled push notifications.", "sql": null }, { "role": "assistant", "content": "SELECT COUNT(*) FROM social_media.user_settings WHERE email_notifications_enabled = TRUE AND push_notificati...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.doctors ( doctor_id character varying(64) NOT NULL, first_name character ...
[ { "role": "user", "content": "Can you show me the count of new doctors added each month in 2023? Return the month and number of doctors.", "sql": null }, { "role": "assistant", "content": "SELECT DATE_TRUNC('month', created_at) AS month, COUNT(*) AS doctor_count\nFROM healthcare.doctors\nWHE...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.game_sessions ( session_id uuid, player_id uuid, game_id uuid, ser...
[ { "role": "user", "content": "For each player, show the total number of achievements they have unlocked and their total game session count.", "sql": null }, { "role": "assistant", "content": "SELECT p.player_id, COUNT(pa.achievement_id) AS total_achievements_unlocked, COUNT(gs.session_id) AS...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.likes ( like_id.text, user_id.text, post_id.text, comment_id.text, crea...
[ { "role": "user", "content": "Show the total number of likes made by each user, including the user_id and their like count.", "sql": null }, { "role": "assistant", "content": "SELECT user_id, COUNT(*) AS like_count FROM social_media.likes GROUP BY user_id;", "sql": null }, { "rol...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.contracts ( contract_id character varying(64) NOT NULL, address character varyi...
[ { "role": "user", "content": "Show me all contracts deployed on the 'ethereum' network along with their deployer addresses and the count of transactions they've been involved in, sorted by transaction count in descending order.", "sql": null }, { "role": "assistant", "content": "SELECT c.con...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.lawyers ( lawyer_id text PRIMARY KEY, first_name text, last_name text...
[ { "role": "user", "content": "List all partners who were hired in the same year. Show their first name, last name, hire year, and firm ID.", "sql": null }, { "role": "assistant", "content": "SELECT l1.first_name, l1.last_name, EXTRACT(YEAR FROM l1.hire_date) AS hire_year, l1.firm_id FROM leg...
You are an expert in writing database language. You can write a corresponding 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 text PRIMARY KEY, policy_id text, customer_id text, inci...
[ { "role": "user", "content": "List all active insurance products, including their product name, type, and base premium.", "sql": null }, { "role": "assistant", "content": "SELECT product_name, product_type, base_premium FROM insurance.insurance_products WHERE is_active = TRUE;", "sql": n...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.customers ( customer_id character varying(64) NOT NULL, first_name charact...
[ { "role": "user", "content": "List each claim with its policy number and the selling agent's first and last name.", "sql": null }, { "role": "assistant", "content": "SELECT c.claim_id, p.policy_number, a.first_name, a.last_name\nFROM insurance.claims c\nJOIN insurance.policies p ON c.policy_...
You are an expert in writing database language. You can write a corresponding 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 gaming_technology.player_achievements ( player_achievement_id uuid NOT NULL DEFA...
[ { "role": "user", "content": "Calculate for each player the timespan between their earliest and latest achievement unlocks.", "sql": null }, { "role": "assistant", "content": "SELECT pa_min.player_id,\n pa_max.max_time - pa_min.min_time AS span\nFROM (\n SELECT player_id,\n MI...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE financial_services.customers ( customer_id text, first_name text, last_name text, da...
[ { "role": "user", "content": "Show me all trades for a given security ID 'SEC123', displaying trade_id, account_id, trade_type, quantity, and total_amount.", "sql": null }, { "role": "assistant", "content": "SELECT trade_id, account_id, trade_type, quantity, total_amount\nFROM financial_serv...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.citizens ( citizen_id character varying(64) NOT NULL, national_i...
[ { "role": "user", "content": "Find all applications whose last update occurred on a weekend. Show application_id, citizen full name, last_updated_at, and status.", "sql": null }, { "role": "assistant", "content": "SELECT\na.application_id,\n(c.first_name || ' ' || c.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 government_services.applications ( application_id character varying(64) NOT NULL, ci...
[ { "role": "user", "content": "List the reference number and status for all applications, including the registration date of the citizen who submitted it.", "sql": null }, { "role": "assistant", "content": "SELECT a.reference_number, a.status, c.registration_date FROM government_services.appl...
You are an expert in writing database language. You can write a corresponding 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": "How many group chats have been created since January 1, 2024?", "sql": null }, { "role": "assistant", "content": "SELECT COUNT(*) AS group_chat_count\nFROM social_media.conversations\nWHERE is_group_chat = TRUE\n AND created_at >= '2024-01-01';", "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 CREATE TABLE web3.tokens ( token_id character varying(64) NOT NULL, -- unique identifier for...
[ { "role": "user", "content": "List the token symbol and name for all tokens whose associated contract address has emitted at least one event. Also include the contract address.", "sql": null }, { "role": "assistant", "content": "SELECT T.token_symbol, T.token_name, T.contract_address FROM we...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.routes ( route_id character varying(64) NOT NULL, -- unique iden...
[ { "role": "user", "content": "List the top 5 passengers by total fare spent across all their bookings.", "sql": null }, { "role": "assistant", "content": "SELECT p.passenger_id, p.first_name || ' ' || p.last_name AS full_name, SUM(b.fare) AS total_fare FROM transportation.bookings b JOIN tra...
You are an expert in writing database language. You can write a corresponding 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": "Find pairs of documents in the same case where one document is of type 'Contract' and the other is of type 'Evidence'. Return the case_id, the contract document_name as contract_name, and the evidence document_name as evidence_name.", "sql": null }, { "role": "assis...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.rooms ( room_id text, property_id text, room_number text, roo...
[ { "role": "user", "content": "List all guests who have reservations for rooms that are currently marked as 'Maintenance'. Include the guest's full name, room number, and the reservation check-in and check-out dates.", "sql": null }, { "role": "assistant", "content": "SELECT g.first_name || '...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.locations ( location_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "List for each fuel_type and unit the average total_cost at each fueling location. Include fuel_type, unit, location name, city, and average_cost, and order the result by average_cost descending.", "sql": null }, { "role": "assistant", "content": "SELECT\n f.f...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.agencies ( agency_id character varying(64) NOT NULL, agency_name...
[ { "role": "user", "content": "Get the name of each agency and the count of accessible service locations it operates in. Only include agencies that have more than two accessible locations.", "sql": null }, { "role": "assistant", "content": "SELECT a.agency_name, COUNT(sl.location_id) AS acces...
You are an expert in writing database language. You can write a corresponding 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 text, token_symbol text, pnl numeric, ...
[ { "role": "user", "content": "Which 3 tokens across all chains have the highest realized_ratio and what are their avg_cost and roi?", "sql": null }, { "role": "assistant", "content": "SELECT token_symbol, chain, realized_ratio, avg_cost, roi\nFROM smart_money_token_performance\nORDER BY real...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.medications ( medication_id text PRIMARY KEY, medication_name text, gener...
[ { "role": "user", "content": "List all medications with a description that includes the word 'antibiotic'.", "sql": null }, { "role": "assistant", "content": "SELECT * FROM healthcare.medications WHERE description ILIKE '%antibiotic%';", "sql": null } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.policies ( policy_id character varying(64) NOT NULL, customer_id character...
[ { "role": "user", "content": "Find all pairs of policies for the same customer where their coverage periods overlap. Show customer_id, policy1_id, policy2_id, overlap_start, and overlap_end.", "sql": null }, { "role": "assistant", "content": "SELECT p1.customer_id,\n p1.policy_id AS po...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.games ( game_id uuid NOT NULL DEFAULT gen_random_uuid(), title cha...
[ { "role": "user", "content": "Can you list each server along with its game title and how many players it can still accommodate (max_players - current_players)?", "sql": null }, { "role": "assistant", "content": "SELECT s.server_id,\n s.server_name,\n g.title AS game_title,\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 government_services.notifications ( notification_id character varying(64) NOT NULL, ...
[ { "role": "user", "content": "List the application_id and the number of notifications with status 'Pending' for each application.", "sql": null }, { "role": "assistant", "content": "SELECT application_id, COUNT(*) AS pending_notification_count\nFROM government_services.notifications\nWHERE 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 manufacturing.components ( component_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "我想查询某个组件的检查记录,包括检查类型、检查结果和检查时间,同时还需要组件的名称和描述。", "sql": null }, { "role": "assistant", "content": "SELECT i.inspection_type, i.result, i.inspection_timestamp, c.component_name, c.description\nFROM manufacturing.inspections i\nJOIN manufacturing.components c ON i....
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.patients ( patient_id.text, first_name.text, last_name.text, date_of_birt...
[ { "role": "user", "content": "List all patients who have had appointments and were prescribed a medication manufactured by 'Merck'. Show the patient ID, full name, appointment ID, and medication name.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT p.patient_id, p.first_n...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id.text, property_name.text, address_li...
[ { "role": "user", "content": "List each property along with the number of service orders placed by its manager in the last 30 days.", "sql": null }, { "role": "assistant", "content": "SELECT p.property_name, COUNT(so.order_id) AS order_count\nFROM hospitality_technology.properties p\nJOIN ho...
You are an expert in writing database language. You can write a corresponding 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": "Retrieve each employee with their manager's first_name and last_name.", "sql": null }, { "role": "assistant", "content": "SELECT e.employee_id, e.first_name AS employee_first_name, e.last_name AS employee_last_name, m.first_name AS manager_first_name, m.last_nam...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id.text, license_plate.text, vin.text, make.text, ...
[ { "role": "user", "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?", "sql": null }, { "role": "assistant", "content": "SELECT l.location_id, l.name, l.city, COUNT(fl.fuel_log_id) AS...