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 cex_token_balance (", "snapshot_time character varying(32) NOT NULL, -- the ...
[ { "content": "Find all tokens on the 'BSC' chain in the latest snapshot where the individual holding `usd_value` is greater than $1,000,000. Show their symbol, exchange, balance, and USD value.", "role": "user", "sql": null }, { "content": "WITH latest_snapshot AS (\n SELECT max(snapshot_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 financial_services.customers ( customer_id character varying(64) NOT NULL, first_nam...
[ { "content": "I need a summary of total traded volume and average price per unit by sector using the trades and securities tables for trades in the last 30 days.", "role": "user", "sql": null }, { "content": "SELECT\n s.sector,\n SUM(t.quantity) AS total_volume,\n AVG(t.price_per_unit) AS avg...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.clients ( client_id text PRIMARY KEY, first_name text, last_name text...
[ { "content": "List each partner lawyer's first_name, last_name along with the count of invoices for the cases they lead.", "role": "user", "sql": null }, { "content": "SELECT l.lawyer_id, l.first_name, l.last_name, COUNT(i.invoice_id) AS invoice_count\nFROM legal_services.lawyers l\nJOIN legal_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 token_basic_info ( coin_id text, token_name text, token_symbol text, token_address t...
[ { "content": "For the 'DeFi' narrative, what is the average ROI and the total net inflow (usd_value where type=1) from smart money token inflow?", "role": "user", "sql": null }, { "content": "SELECT AVG(sm.roi) AS avg_roi, SUM(smt.usd_value) AS total_net_inflow\nFROM smart_money_token_inflow smt...
You are an expert in writing database language. You can write a corresponding 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...
[ { "content": "List the record_id, record_date, and treatment_plan for all medical records where the treatment_plan field is not null.", "role": "user", "sql": null }, { "content": "SELECT record_id, record_date, treatment_plan\nFROM healthcare.medical_records\nWHERE treatment_plan IS NOT 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.routes ( route_id text PRIMARY KEY, route_number text, description te...
[ { "content": "For each vehicle that appears in both the maintenance logs and fuel logs tables, calculate the total maintenance cost and the total fuel cost. Display the vehicle ID and these two total costs.", "role": "user", "sql": null }, { "content": "SELECT T1.vehicle_id , SUM(T1.cost) AS to...
You are an expert in writing database language. You can write a corresponding 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": "Show me the first name, last name, and date of birth for all patients who are male.", "role": "user", "sql": null }, { "content": "SELECT first_name, last_name, date_of_birth FROM healthcare.patients WHERE gender = 'Male';", "role": "assistant", "sql": null }, { "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 trading_platform.orders ( order_id character varying(64) NOT NULL, user_id character...
[ { "content": "I need the total traded value (quantity * price) for each buyer and asset symbol for trades after '2024-06-01'. List buyer_id, asset symbol, and total_value.", "role": "user", "sql": null }, { "content": "SELECT t.buyer_id, m.value AS asset_symbol, SUM(t.quantity * t.price) AS 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 project_fundraising_record ( id text, project_id text, project_name text, rounds_nam...
[ { "content": "For each fundraising round, can you list the total amount invested and the corresponding number of projects in that round, as well as the highest token market cap associated with any project of that round? Please show the round name, total investment, project count, and max token market cap.", ...
You are an expert in writing database language. You can write a corresponding 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, -- fundrai...
[ { "content": "List the top 5 tokens by 24 hour trading volume on DEX pools.", "role": "user", "sql": null }, { "content": "SELECT token_name, token_symbol, volume_24h \nFROM token_dexpool_info \nORDER BY volume_24h DESC LIMIT 5;", "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 insurance.policies ( policy_id character varying(64) NOT NULL, customer_id character...
[ { "content": "List all policies that have at least one beneficiary with a 'Child' relationship, showing policy number, policy status, and the number of child beneficiaries for that policy.", "role": "user", "sql": null }, { "content": "SELECT T1.policy_number, T1.status, COUNT(T2.beneficiary_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 transportation.drivers ( driver_id character varying(64) NOT NULL, employee_id chara...
[ { "content": "List the route number, route type, distance, and the city of the origin location for all routes.", "role": "user", "sql": null }, { "content": "SELECT T1.route_number , T1.type , T1.distance_km , T2.city FROM transportation.routes AS T1 JOIN transportation.locations AS T2 ON 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 hospitality_technology.staff ( staff_id character varying(64) NOT NULL, property_id ...
[ { "content": "Show me each staff member's first and last name along with their manager's first and last name.", "role": "user", "sql": null }, { "content": "SELECT s.staff_id,\n s.first_name,\n s.last_name,\n m.staff_id AS manager_id,\n m.first_name AS manager_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 hospitality_technology.properties ( property_id character varying(64) NOT NULL, prop...
[ { "content": "Calculate the average length of stay in days for completed reservations for each property.", "role": "user", "sql": null }, { "content": "SELECT p.property_id,\n p.property_name,\n AVG(res.check_out_date - res.check_in_date) AS avg_stay_days\nFROM hospitality_technology...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.player_achievements ( player_achievement_id.uuid, player_id.uuid, ...
[ { "content": "List each player's most recent achievement unlock, showing the player_id, achievement_id, and unlocked_at timestamp.", "role": "user", "sql": null }, { "content": "SELECT pa.player_id, pa.achievement_id, pa.unlocked_at FROM gaming_technology.player_achievements pa INNER JOIN (SELEC...
You are an expert in writing database language. You can write a corresponding 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, patient_id ch...
[ { "content": "Show me all medical records created in the last 6 months.", "role": "user", "sql": null }, { "content": "SELECT * FROM healthcare.medical_records WHERE record_date >= CURRENT_DATE - INTERVAL '6 months';", "role": "assistant", "sql": null }, { "content": "Now, narrow...
You are an expert in writing database language. You can write a corresponding 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 me the average high price and average low price for each security sector using market data.", "role": "user", "sql": null }, { "content": "SELECT T1.sector, AVG(T2.high_price) AS average_high_price, AVG(T2.low_price) AS average_low_price FROM financial_services.securities AS T...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.player_inventory ( inventory_id uuid NOT NULL DEFAULT gen_random_u...
[ { "content": "Find players who own items with rarity 'Rare' or higher ('Epic', 'Legendary') and list their usernames.", "role": "user", "sql": null }, { "content": "SELECT DISTINCT T1.username FROM players AS T1 INNER JOIN player_inventory AS T2 ON T1.player_id = T2.player_id INNER JOIN items 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 financial_services.securities ( security_id text, ticker_symbol text, isin_code text...
[ { "content": "Show me the number of employees in each job title and department, for only employees whose status is 'Active'.", "role": "user", "sql": null }, { "content": "SELECT job_title, department, COUNT(employee_id) AS employee_count\nFROM financial_services.employees\nWHERE status = 'Activ...
You are an expert in writing database language. You can write a corresponding 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...
[ { "content": "Count the number of policies by their status.", "role": "user", "sql": null }, { "content": "SELECT status, COUNT(*) AS policy_count\nFROM insurance.policies\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 social_media.users ( user_id text, username text, email text, password_hash text, fu...
[ { "content": "List all comments on a given post along with the commenter’s username and the comment time.", "role": "user", "sql": null }, { "content": "SELECT c.comment_id, c.content, u.username, c.created_at\nFROM social_media.comments c\nJOIN social_media.users u ON c.user_id = u.user_id\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 legal_services.law_firms ( firm_id character varying(64) NOT NULL, firm_name charact...
[ { "content": "Show me the count of law firms grouped by the year they were founded. Include the founding year and the number of firms.", "role": "user", "sql": null }, { "content": "SELECT\n EXTRACT(YEAR FROM founded_date) AS founding_year,\n COUNT(firm_id) AS firm_count\nFROM legal_services.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 insurance.policies ( policy_id text, customer_id text, product_id text, agent_id tex...
[ { "content": "List all insurance products that have a base premium greater than 1000 and are currently active, showing product name, type, and base premium.", "role": "user", "sql": null }, { "content": "SELECT product_name, product_type, base_premium FROM insurance.insurance_products WHERE base...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.clients ( client_id text PRIMARY KEY, first_name text, last_name text...
[ { "content": "List the names of all law firms along with the names (first and last) of lawyers who are partners in those firms.", "role": "user", "sql": null }, { "content": "SELECT lf.firm_name, l.first_name, l.last_name\nFROM legal_services.law_firms lf\nJOIN legal_services.lawyers l ON lf.fir...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.medical_records ( record_id character varying(64) NOT NULL, -- uniqu...
[ { "content": "List each patient's first and last medical record entries, showing patient_id, earliest_record_id, earliest_record_date, latest_record_id, and latest_record_date.", "role": "user", "sql": null }, { "content": "SELECT\n fl.patient_id,\n fr.record_id AS earliest_record_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 legal_services.clients ( client_id character varying(64) NOT NULL, -- unique id...
[ { "content": "Show the number of documents uploaded for each case, including the case number and the case name.", "role": "user", "sql": null }, { "content": "SELECT c.case_number, c.case_name, COUNT(d.document_id) AS document_count\nFROM legal_services.cases c\nJOIN legal_services.documents d 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 legal_services.invoices ( invoice_id text, invoice_number text, client_id text, case...
[ { "content": "Show me all invoices for case_id 'case_777', including the invoice number, total amount, and status.", "role": "user", "sql": null }, { "content": "SELECT invoice_number, total_amount, status FROM legal_services.invoices WHERE case_id = 'case_777';", "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 erc1155_approval_for_all ( block_number bigint NOT NULL, block_timestamp timestamp(3...
[ { "content": "List SUI coins with owner, coin type, balance, and status.", "role": "user", "sql": null }, { "content": "SELECT owner, coin_type, balance, status FROM sui_coins;", "role": "assistant", "sql": null }, { "content": "Only include coins where status is 'exists' and bal...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.clients ( client_id text PRIMARY KEY, first_name text, last_name text...
[ { "content": "List the first name, last name, email, and phone number of all clients who have a case of type 'Bankruptcy', along with the name of the case.", "role": "user", "sql": null }, { "content": "SELECT T1.first_name , T1.last_name , T1.email , T1.phone , T2.case_name FROM legal_servi...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.clients ( client_id character varying(64) NOT NULL, first_name charac...
[ { "content": "Show me all clients along with their email addresses who registered in the year 2023.", "role": "user", "sql": null }, { "content": "SELECT first_name, last_name, email FROM legal_services.clients WHERE EXTRACT(YEAR FROM date_registered) = 2023;", "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 government_services.employees ( employee_id text, agency_id text, first_name text, l...
[ { "content": "List the full names of employees whose direct manager themselves report to another manager. Also show the direct manager's full name.", "role": "user", "sql": null }, { "content": "SELECT E.first_name, E.last_name, M.first_name AS manager_first_name, M.last_name AS manager_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 government_services.citizens ( citizen_id text, national_id_number text, first_name ...
[ { "content": "List all agencies and their main phone numbers.", "role": "user", "sql": null }, { "content": "SELECT agency_name, main_phone_number FROM government_services.agencies;", "role": "assistant", "sql": null }, { "content": "Now show me the service locations associated w...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.rooms ( room_id character varying(64) NOT NULL, property_id c...
[ { "content": "For each room type, show the total number of completed reservations and the total amount paid, considering only reservations with status 'CheckedOut'.", "role": "user", "sql": null }, { "content": "SELECT rt.type_name, COUNT(r.reservation_id) AS reservation_count, SUM(r.amount_paid...
You are an expert in writing database language. You can write a corresponding 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": "Show me all servers, the title of the game they host, and the name of the game's developer.", "role": "user", "sql": null }, { "content": "SELECT s.server_name, g.title AS game_title, d.name AS developer_name FROM gaming_technology.servers s JOIN gaming_technology.games g ON s.game...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.patient_insurance ( patient_insurance_id character varying(64) NOT NU...
[ { "content": "List all insurance plans that will expire within the next 30 days, showing the patient IDs and subscriber names.", "role": "user", "sql": null }, { "content": "SELECT patient_id, subscriber_name, policy_number, expiration_date\nFROM healthcare.patient_insurance\nWHERE expiration_da...
You are an expert in writing database language. You can write a corresponding 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...
[ { "content": "List all public reviews that have a staff response, showing the review ID, overall rating, and the full name of the staff member who responded.", "role": "user", "sql": null }, { "content": "SELECT T1.review_id, T1.rating_overall, T2.first_name, T2.last_name FROM hospitality_techno...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.wallets ( wallet_id text, user_id text, address text, private_key text, created...
[ { "content": "What is the total number of wallets recorded?", "role": "user", "sql": null }, { "content": "SELECT COUNT(*) FROM web3.wallets;", "role": "assistant", "sql": null }, { "content": "Can you show me the number of wallets created on each distinct date?", "role": "us...
You are an expert in writing database language. You can write a corresponding 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": "Show the plan name and insurance provider for all insurance plans along with the total number of unique patients enrolled in each plan.", "role": "user", "sql": null }, { "content": "SELECT ip.plan_name, ip.insurance_provider, COUNT(DISTINCT pi.patient_id) AS enrolled_patient_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 healthcare.patients ( patient_id character varying(64) NOT NULL, -- unique iden...
[ { "content": "List the medication name and manufacturer of all medications where the description contains the word 'extended'.", "role": "user", "sql": null }, { "content": "SELECT medication_name, manufacturer\nFROM healthcare.medications\nWHERE description ILIKE '%extended%';", "role": "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 transportation.passengers ( passenger_id text PRIMARY KEY, first_name text, last_nam...
[ { "content": "Count the number of passengers in each month of the year 2024 based on their created_at date.", "role": "user", "sql": null }, { "content": "SELECT EXTRACT(MONTH FROM created_at) AS month, COUNT(*) AS passenger_count\nFROM transportation.passengers\nWHERE created_at >= '2024-01-01'...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.passengers ( passenger_id character varying(64) NOT NULL, -- uni...
[ { "content": "Show me the first name, last name, and email address for passengers who have made a booking with 'Completed' status.", "role": "user", "sql": null }, { "content": "SELECT DISTINCT p.first_name, p.last_name, p.email FROM transportation.passengers p JOIN transportation.bookings b 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 hospitality_technology.staff ( staff_id character varying(64) NOT NULL, property_id ...
[ { "content": "Show me all active staff including their staff_id, first_name, last_name, position, and work_email.", "role": "user", "sql": null }, { "content": "SELECT staff_id,\n first_name,\n last_name,\n position,\n work_email\nFROM hospitality_technology.staff\nWHERE ...
You are an expert in writing database language. You can write a corresponding 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": "I want to find all appointment pairs where two appointments are scheduled for the same client at overlapping times. Provide the appointment_id from both overlapping appointments.", "role": "user", "sql": null }, { "content": "SELECT a1.appointment_id AS appointment_id_1, a2.appoint...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.transactions ( transaction_id character varying(64) NOT NULL, from_address char...
[ { "content": "Find all transactions where the from_address is the same as the to_address, indicating self-transactions, and show the transaction_id, value, and gas_used.", "role": "user", "sql": null }, { "content": "SELECT transaction_id, value, gas_used FROM web3.transactions WHERE from_addres...
You are an expert in writing database language. You can write a corresponding 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, -- uni...
[ { "content": "List all insurance products with a base premium greater than 1000 and less than 5000. Show the product name, product type, and base premium.", "role": "user", "sql": null }, { "content": "SELECT product_name, product_type, base_premium FROM insurance.insurance_products WHERE base_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 healthcare.medical_records ( record_id text PRIMARY KEY, patient_id text, appointmen...
[ { "content": "Show me medical records that mention a medication from the 'medications' table by name in their treatment plan. List the record ID, record date, patient ID, and the name of the mentioned medication.", "role": "user", "sql": null }, { "content": "SELECT T1.record_id, T1.record_date,...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.wallets ( wallet_id character varying(64) NOT NULL, -- unique ...
[ { "content": "I want a report of user IDs with their KYC status and the count of wallets they have.", "role": "user", "sql": null }, { "content": "SELECT k.user_id, k.status, COUNT(w.wallet_id) AS wallet_count\nFROM trading_platform.kyc_audit k\nLEFT JOIN trading_platform.wallets w ON k.user_id ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id character varying(64) NOT NULL, prop...
[ { "content": "List all active staff members who are managers, along with their hire dates and email addresses.", "role": "user", "sql": null }, { "content": "SELECT staff_id, first_name, last_name, position, work_email, hire_date FROM hospitality_technology.staff WHERE is_active = true AND posit...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.medications ( medication_id character varying(64) NOT NULL, medication_na...
[ { "content": "How many medications does each manufacturer have?", "role": "user", "sql": null }, { "content": "SELECT manufacturer, COUNT(*) AS med_count\nFROM healthcare.medications\nGROUP BY manufacturer;", "role": "assistant", "sql": null }, { "content": "Only include manufact...
You are an expert in writing database language. You can write a corresponding 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": "Retrieve all public posts that have geolocation coordinates specified, showing post_id, user_id, location_lat, location_lon, ordered by created_at descending.", "role": "user", "sql": null }, { "content": "SELECT post_id, user_id, location_lat, location_lon\nFROM social_media.posts...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.reservations ( reservation_id text, property_id text, guest_i...
[ { "content": "Find all pairs of overlapping reservations for the same room. Show the two reservation IDs, room_id, and both reservations' check-in and check-out dates.", "role": "user", "sql": null }, { "content": "SELECT r1.reservation_id AS reservation1_id, r2.reservation_id AS reservation2_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 financial_services.customers ( customer_id text PRIMARY KEY, first_name text, last_n...
[ { "content": "Which customers have accounts with a balance over 500,000 USD? Please include the customer's first and last name along with the account number and current balance.", "role": "user", "sql": null }, { "content": "SELECT c.first_name, c.last_name, a.account_number, a.balance FROM fina...
You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, user_id character...
[ { "content": "List all orders that are currently pending and were created more than 24 hours ago.", "role": "user", "sql": null }, { "content": "SELECT * FROM trading_platform.orders WHERE status = 'pending' AND created_at < CURRENT_TIMESTAMP - INTERVAL '24 hours';", "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 blockchain.addresses ( address_id character varying(128) NOT NULL, public_key text N...
[ { "content": "List all address IDs and their corresponding public keys from the addresses table.", "role": "user", "sql": null }, { "content": "SELECT address_id, public_key FROM blockchain.addresses;", "role": "assistant", "sql": null }, { "content": "Now, filter these results 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 project_fundraising_record ( id character varying(32) NOT NULL, -- fundraising reco...
[ { "content": "Which fundraising round type had the highest total valuation across all projects, and which projects are in that round?", "role": "user", "sql": null }, { "content": "WITH round_valuations AS (\n SELECT\n rounds_name,\n SUM(valuation) AS total_valuation\n FROM 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 social_media.posts ( post_id text PRIMARY KEY, user_id text, content text, media_url...
[ { "content": "Can you show me all followers of a given user, including their usernames and the date they started following?", "role": "user", "sql": null }, { "content": "SELECT f.follower_user_id, u.username, f.created_at\nFROM social_media.follows f\nJOIN social_media.users u ON f.follower_use...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE project_fundraising_record ( id.text, project_id.text, project_name.text, rounds_nam...
[ { "content": "For each token listed in token_dexpool_info, can you show the total net_flow and average ROI from smart_money_token_performance, along with the token's symbol and chain?", "role": "user", "sql": null }, { "content": "SELECT tdi.token_symbol, tdi.chain, SUM(sm.net_flow) AS total_net...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.developers ( developer_id uuid PRIMARY KEY, name text, country tex...
[ { "content": "Show me all players who have acquired items from games that have running servers in the 'ap-northeast-1' region, and the item names they acquired.", "role": "user", "sql": null }, { "content": "SELECT DISTINCT pi.player_id, igi.item_name \nFROM gaming_technology.player_inventory pi...
You are an expert in writing database language. You can write a corresponding 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.transactions ( transaction_id character varying(64) NOT NULL, acc...
[ { "content": "Show me the total amount of 'Deposit' and 'Withdrawal' transactions for each account in March 2024.", "role": "user", "sql": null }, { "content": "SELECT account_id, transaction_type, SUM(amount) AS total_amount\nFROM financial_services.transactions\nWHERE transaction_type IN ('Dep...
You are an expert in writing database language. You can write a corresponding 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": "Find appointments and prescriptions associated with the same patient and doctor. Show the appointment ID, prescription ID, patient ID, and doctor ID.", "role": "user", "sql": null }, { "content": "SELECT T1.appointment_id , T2.prescription_id , T1.patient_id , T1.doctor_id 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 gaming_technology.players ( player_id uuid PRIMARY KEY, username text, email text, p...
[ { "content": "Show me a list of players and, for each, list all the different games where they have acquired items. Also include the number of unique item types they've acquired per game.", "role": "user", "sql": null }, { "content": "SELECT p.player_id, p.username, g.title AS game_title, 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 // Use Hashes for ticket details. Key format: ticket:<ticket_id> // HSET ticket:tkt_1a2b ticket_i...
[ { "content": "特定の予約ID 'book_zyx' に関連するすべてのチケットの詳細を取得するのを手伝っていただけますか?また、関連する車両情報も含めてください。", "role": "user", "sql": null }, { "content": "SMEMBERS booking:book_zyx:tickets\nHGETALL ticket:<ticket_id>\nHGETALL car:<car_id>", "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 token_basic_info ( coin_id character varying(100) NOT NULL, token_name character var...
[ { "content": "Show me the top 3 tokens by trend rank in the 'NFT' narrative, along with their price and 24-hour trading volume.", "role": "user", "sql": null }, { "content": "SELECT token_name, token_symbol, price, total_volume FROM token_basic_info WHERE narrative = 'NFT' ORDER BY trend_rank 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 government_services.agencies ( agency_id character varying(64) NOT NULL, -- uniq...
[ { "content": "List the agency names and addresses for all service locations in the state of 'Florida'.", "role": "user", "sql": null }, { "content": "SELECT a.agency_name, l.address\nFROM government_services.service_locations l\nJOIN government_services.agencies a ON l.agency_id = a.agency_id\nW...
You are an expert in writing database language. You can write a corresponding 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": "Show all ERC20 token approvals that happened between block numbers 18000000 and 18500000, including the contract address and number of approvals per contract.", "role": "user", "sql": null }, { "content": "SELECT contract_address, COUNT(*) AS approval_count FROM erc20_approval WHER...
You are an expert in writing database language. You can write a corresponding 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": "Which insurance products have had a policy issued in 2024, and what is the name and type of those products? Show the product_id, product_name, and product_type.", "role": "user", "sql": null }, { "content": "SELECT DISTINCT ip.product_id, ip.product_name, ip.product_type\nFROM insu...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.clients ( client_id character varying(64) NOT NULL, first_name charac...
[ { "content": "Calculate the total amount billed for each client, showing their first name, last name, and the total amount.", "role": "user", "sql": null }, { "content": "SELECT c.first_name, c.last_name, SUM(i.total_amount) FROM legal_services.clients c JOIN legal_services.invoices i ON c.clien...
You are an expert in writing database language. You can write a corresponding 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.appointments ( appointment_id text PRIMARY KEY, citizen_id text,...
[ { "content": "How many appointments are scheduled to start tomorrow?", "role": "user", "sql": null }, { "content": "SELECT count(*) FROM government_services.appointments WHERE DATE(scheduled_start_time) = CURRENT_DATE + INTERVAL '1 day'", "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 healthcare.medications ( medication_id text PRIMARY KEY, medication_name text, gener...
[ { "content": "List the medication IDs and names for all entries where the description is missing or empty.", "role": "user", "sql": null }, { "content": "SELECT medication_id, medication_name FROM healthcare.medications WHERE description IS NULL OR description = '';", "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 character varying(64) NOT NULL, -- unique ...
[ { "content": "Show me the top 3 vehicles with the highest average passenger count on completed trips, and include each vehicle's license plate, make, and the average passenger count.", "role": "user", "sql": null }, { "content": "SELECT v.vehicle_id,\n v.license_plate,\n v.make,\n ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id character varying(64) NOT NULL, prop...
[ { "content": "List all staff members, showing their full name, position, and the name of the property where they work.", "role": "user", "sql": null }, { "content": "SELECT T1.first_name, T1.last_name, T1.position, T2.property_name FROM hospitality_technology.staff AS T1 JOIN hospitality_technol...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.claims ( claim_id character varying(64) NOT NULL, -- unique identifier...
[ { "content": "Calculate the average number of days between when an incident occurred and when the claim was reported, but only for claims that were settled in the year 2023.", "role": "user", "sql": null }, { "content": "SELECT\n AVG(EXTRACT(EPOCH FROM (reported_date - incident_date)) / 86400.0...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.agents ( agent_id text, first_name text, last_name text, agency_name text,...
[ { "content": "I need a list of agents along with their manager's contact email and phone number.", "role": "user", "sql": null }, { "content": "SELECT a.agent_id, a.first_name, a.last_name, m.contact_email AS manager_email, m.contact_phone AS manager_phone FROM insurance.agents a LEFT JOIN insur...
You are an expert in writing database language. You can write a corresponding 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 the total hours spent by each lawyer across all their time entries. Display the lawyer's first name, last name, and the total hours.", "role": "user", "sql": null }, { "content": "SELECT l.first_name, l.last_name, SUM(te.hours_spent) AS total_hours FROM legal_services.time_ent...
You are an expert in writing database language. You can write a corresponding 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": "How many trips used more than 500 units of fuel, and what are their trip IDs and scheduled departure times?", "role": "user", "sql": null }, { "content": "SELECT t.trip_id, t.scheduled_departure, SUM(f.quantity) AS total_fuel\nFROM transportation.trips t\nJOIN transportation.fuel_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 healthcare.diagnoses ( diagnosis_id.text, record_id.text, patient_id.text, doctor_id...
[ { "content": "For each diagnosis code_type, calculate the average number of refills_allowed for prescriptions linked to chronic diagnoses.", "role": "user", "sql": null }, { "content": "SELECT\n d.code_type,\n AVG(p.refills_allowed) AS avg_refills_allowed\nFROM healthcare.diagnoses d\nJOIN hea...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE erc20_balances_historical ( block_number bigint NOT NULL, -- Block number contai...
[ { "content": "For Sui NFTs with status 'exists', list their object_id, name, and owner.", "role": "user", "sql": null }, { "content": "SELECT object_id, name, owner\nFROM sui_nfts\nWHERE status = 'exists';", "role": "assistant", "sql": null }, { "content": "I also need to see col...
You are an expert in writing database language. You can write a corresponding 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": "Show the policy number, policy start date, and the name and type of the insurance product for all active policies.", "role": "user", "sql": null }, { "content": "SELECT p.policy_number, p.start_date, ip.product_name, ip.product_type FROM insurance.policies p JOIN insurance.insuranc...
You are an expert in writing database language. You can write a corresponding 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": "List the medication_id and medication_name for all medications with a generic name that starts with 'Amox'.", "role": "user", "sql": null }, { "content": "SELECT medication_id, medication_name\nFROM healthcare.medications\nWHERE generic_name ILIKE 'Amox%';", "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 legal_services.lawyers ( lawyer_id.text, first_name.text, last_name.text, bar_number...
[ { "content": "Show me all lawyers' full names, their bar number, and if they are partners, the full name of another partner from their firm.", "role": "user", "sql": null }, { "content": "SELECT l1.first_name || ' ' || l1.last_name AS lawyer_full_name, l1.bar_number,\n CASE WHEN l1.is_part...
You are an expert in writing database language. You can write a corresponding 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": "Find the average settlement_amount of closed claims for each claim handler. Return claim_handler_id and avg_settlement_amount.", "role": "user", "sql": null }, { "content": "SELECT c.claim_handler_id, AVG(c.settlement_amount) AS avg_settlement_amount\nFROM insurance.claims c\nWHERE...
You are an expert in writing database language. You can write a corresponding 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...
[ { "content": "Show me all service orders for spa services in the last month, including the guest name and staff who delivered the service.", "role": "user", "sql": null }, { "content": "SELECT so.order_id, g.first_name, g.last_name, s.service_name, st.first_name AS staff_first_name, st.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 social_media.follows ( follow_id.text, follower_user_id.text, following_user_id.text...
[ { "content": "List all unique pairs of users where one follows the other, showing both the follower and following user ID.", "role": "user", "sql": null }, { "content": "SELECT DISTINCT follower_user_id, following_user_id\nFROM social_media.follows;", "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 cex_token_balance (", "snapshot_time character varying(32) NOT NULL, -- the ...
[ { "content": "Which token symbol has the highest price among all tokens held by CEXes on the Polygon chain?", "role": "user", "sql": null }, { "content": "SELECT token_symbol, MAX(price) AS max_price FROM cex_token_balance WHERE chain = 'Polygon' GROUP BY token_symbol ORDER BY max_price DESC LIM...
You are an expert in writing database language. You can write a corresponding 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": "List all pairs of vehicles from the same depot that have different fuel types. Include vehicle1_id, fuel_type1, vehicle2_id, fuel_type2, and the depot_id.", "role": "user", "sql": null }, { "content": "SELECT v1.vehicle_id AS vehicle1_id, v1.fuel_type AS fuel_type1, v2.vehicle_id A...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.trades ( trade_id character varying(64) NOT NULL, order_id characte...
[ { "content": "Calculate the total quantity traded for each day in the dataset.", "role": "user", "sql": null }, { "content": "SELECT DATE_TRUNC('day', traded_at) AS trade_day, SUM(quantity) AS total_daily_quantity FROM trading_platform.trades GROUP BY DATE_TRUNC('day', traded_at) ORDER BY trade_...
You are an expert in writing database language. You can write a corresponding 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": "Can you show me the total number of sessions and the average score for each server and each game combination?", "role": "user", "sql": null }, { "content": "SELECT server_id, game_id, COUNT(*) AS total_sessions, AVG(score) AS average_score FROM gaming_technology.game_sessions GROUP...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.game_sessions ( session_id uuid, player_id uuid, game_id uuid, ser...
[ { "content": "Can you show me each player's total number of achievements unlocked and the total quantity of items they have in inventory for each game they've played?", "role": "user", "sql": null }, { "content": "SELECT pa.player_id, a.game_id, COUNT(DISTINCT pa.achievement_id) AS achievements_...
You are an expert in writing database language. You can write a corresponding 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 pairs of customers who have the same last name but live in different states. Show both customer ids, their full names, and their states.", "role": "user", "sql": null }, { "content": "SELECT a.customer_id AS customer_id_a, a.first_name AS first_name_a, a.last_name AS last_...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id character varying(64) NOT NULL, ...
[ { "content": "Show all payments made for reservations that had more than 2 adults. Include the payment ID, amount, currency, reservation ID, guest full name, and the number of adults in the reservation.", "role": "user", "sql": null }, { "content": "SELECT T1.payment_id, T1.amount, T1.currency_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 financial_services.transactions ( transaction_id text PRIMARY KEY, account_id text, ...
[ { "content": "Give me the total transaction amount and the total count of transactions per day for each currency.", "role": "user", "sql": null }, { "content": "SELECT transaction_date::date AS txn_date, currency, SUM(amount) AS total_amount, COUNT(*) AS txn_count\nFROM financial_services.transa...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id character varying(64) NOT NULL, ...
[ { "content": "For each reservation, can you show the guest's full name, the property name, and the room number?", "role": "user", "sql": null }, { "content": "SELECT r.reservation_id, g.first_name || ' ' || g.last_name AS guest_full_name, p.property_name, rm.room_number\nFROM hospitality_technol...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id text PRIMARY KEY, property_name text...
[ { "content": "Show me the first name, last name, and position of all staff members, along with the name of the property they work at.", "role": "user", "sql": null }, { "content": "SELECT T1.first_name, T1.last_name, T1.position, T2.property_name FROM hospitality_technology.staff AS T1 JOIN hosp...
You are an expert in writing database language. You can write a corresponding 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...
[ { "content": "List all pairs of hashtags created on the same calendar date, showing both tag names and the creation date.", "role": "user", "sql": null }, { "content": "SELECT h1.tag_name AS tag1, h2.tag_name AS tag2, DATE(h1.created_at) AS created_date\nFROM social_media.hashtags h1\nJOIN socia...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.users ( user_id character varying(64) NOT NULL, -- unique identifi...
[ { "content": "List users who commented on posts and the content of the post they commented on. Show commenter username and post content.", "role": "user", "sql": null }, { "content": "SELECT T1.username, T2.content FROM social_media.users AS T1 JOIN social_media.comments AS T3 ON T1.user_id = T3...
You are an expert in writing database language. You can write a corresponding 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...
[ { "content": "How many appointments are recorded in the system?", "role": "user", "sql": null }, { "content": "SELECT COUNT(*) FROM appointments;", "role": "assistant", "sql": null }, { "content": "Show the count of appointments for each status.", "role": "user", "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 web3.tokens ( token_id character varying(64) NOT NULL, -- unique identifier for...
[ { "content": "Show all token symbols along with the names of any other tokens on the same contract address.", "role": "user", "sql": null }, { "content": "SELECT t1.token_symbol, t2.token_name AS other_token_name, t1.contract_address\nFROM web3.tokens t1\nJOIN web3.tokens t2\n ON t1.contract_ad...
You are an expert in writing database language. You can write a corresponding 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": "List all beneficiaries with a percentage_share greater than 30%, showing beneficiary_id, first_name, last_name, relationship, percentage_share, and policy_id.", "role": "user", "sql": null }, { "content": "SELECT beneficiary_id,\n first_name,\n last_name,\n relati...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure Collection 'assembly_steps'. Document structure: { _id: <ObjectId (or step_id)>, step_id: String,...
[ { "content": "特定の職種の従業員情報を取得したいです。従業員ID、名前、職種、雇用日を表示してください。", "role": "user", "sql": null }, { "content": "db.employees.find(\n { job_title: '<specific_job_title>' },\n { employee_id: 1, first_name: 1, last_name: 1, job_title: 1, hire_date: 1, _id: 0 }\n).sort({ hire_date: -1 })", "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 transportation.passengers ( passenger_id character varying(64) NOT NULL, -- uni...
[ { "content": "Please show me the first name, last name, and date of birth for all passengers born before January 1, 1990.", "role": "user", "sql": null }, { "content": "SELECT first_name, last_name, date_of_birth FROM transportation.passengers WHERE date_of_birth < '1990-01-01';", "role": "a...