system stringlengths 328 7.26k | conversations listlengths 2 8 |
|---|---|
You are very professional for database language writing. You can write a corresponding 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_... | [
{
"role": "user",
"content": "For each player, list their username and the total number of unique servers they have played on, only including players who have played on two or more different servers. Also show the titles of all games they've played sessions on."
},
{
"role": "assistant",
"conten... |
You are very professional for database language writing. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.maintenance_logs ( log_id character varying(64) NOT NULL, ve... | [
{
"role": "user",
"content": "Show me all maintenance logs that do not have a next service due date recorded. List the log ID, vehicle ID, and service date."
},
{
"role": "assistant",
"content": "SELECT log_id, vehicle_id, service_date FROM transportation.maintenance_logs WHERE next_service_due_... |
You are very professional for database language writing. You can write a corresponding 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 ... | [
{
"role": "user",
"content": "I need to find all tickets for a specific route 'RT456' along with the car details and route information."
},
{
"role": "assistant",
"content": "SELECT t.ticket_id, t.seat_number, t.price, tc.car_number, tc.car_type, r.route_name, r.description\nFROM train_station_m... |
You are very professional for database language writing. You can write a corresponding 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, a... | [
{
"role": "user",
"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": "assistant",
"content": "SELECT T1.record_id, T1.reco... |
You are very professional for database language writing. You can write 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:
// ... | [
{
"role": "user",
"content": "能否帮我查询特定列车(train_id 为 'train_789')上的所有车辆信息,并关联到该列车所在的路线信息?"
},
{
"role": "assistant",
"content": "SMEMBERS train:train_789:cars\nHGETALL car:<car_id> for each car_id in result\nHGETALL train:train_789\nSMEMBERS schedule:sched_1122:bookings\nHGETALL booking:<booking_... |
You are very professional for database language writing. You can write a corresponding 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_... | [
{
"role": "user",
"content": "List the names of properties and the number of services they offer in the 'Spa' department."
},
{
"role": "assistant",
"content": "SELECT P.property_name, COUNT(S.service_id) AS spa_service_count FROM hospitality_technology.properties AS P JOIN hospitality_technolog... |
You are very professional for database language writing and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Struc... | [
{
"role": "user",
"content": "What are the safety ratings or crash statistics for the Boeing 787 Dreamliner?"
},
{
"role": "assistant",
"content": "I'm sorry, but I don't have access to safety ratings or crash statistics for specific aircraft models like the Boeing 787 Dreamliner. My data is lim... |
You are very professional for database language writing. You can write a corresponding 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... | [
{
"role": "user",
"content": "List all posts along with the user emails of the authors."
},
{
"role": "assistant",
"content": "SELECT p.post_id, p.content, u.email\nFROM social_media.posts p\nJOIN social_media.users u ON p.user_id = u.user_id;"
}
] |
You are very professional for database language writing. You can write a corresponding 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_h... | [
{
"role": "user",
"content": "Which wallets hold at least 100 units of any ERC1155 NFT, and what is the token ID and contract address of the NFT for each such holding?"
},
{
"role": "assistant",
"content": "SELECT wallet_address, contract_address, token_id, amount\nFROM nft_holders\nWHERE contra... |
You are very professional for database language writing. You can write a corresponding 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 chara... | [
{
"role": "user",
"content": "I need a list of all group chat names with every username."
},
{
"role": "assistant",
"content": "SELECT u.username, c.group_name\nFROM social_media.users u\nJOIN social_media.conversations c ON 1=1\nWHERE c.is_group_chat = true;"
},
{
"role": "user",
"c... |
You are very professional for database language writing. You can write a corresponding 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_n... | [
{
"role": "user",
"content": "Show me each payment_method and the number of premium payments made using that method, sorted by the count in descending order."
},
{
"role": "assistant",
"content": "SELECT payment_method, COUNT(*) AS payment_count FROM insurance.premium_payments GROUP BY payment_m... |
You are very professional for database language writing. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.accounts (
account_id character varying(64) NOT NULL... | [
{
"role": "user",
"content": "Summarize the accounts table by account type and currency, showing the average balance for each combination."
},
{
"role": "assistant",
"content": "SELECT account_type, currency, AVG(balance) AS average_balance, COUNT(account_id) AS account_count FROM financial_serv... |
You are very professional for database language writing. You can write a corresponding 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, r... | [
{
"role": "user",
"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 tok... |
You are very professional for database language writing. You can write a corresponding 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 text, username text, email text, password_... | [
{
"role": "user",
"content": "Show me the top 5 users who have the highest total trade volume (quantity * price) as buyers, along with their email addresses and the number of distinct assets they traded."
},
{
"role": "assistant",
"content": "SELECT u.user_id, u.email, COUNT(DISTINCT t.asset_id)... |
You are very professional for database language writing. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.services ( service_id text, agency_id text, service_nam... | [
{
"role": "user",
"content": "For each agency, how many services are currently inactive? Return the agency_id and the count of inactive services."
},
{
"role": "assistant",
"content": "SELECT\n agency_id,\n COUNT(*) AS inactive_service_count\nFROM government_services.services\nWHERE is_active ... |
You are very professional for database language writing. You can write a corresponding 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_h... | [
{
"role": "user",
"content": "Show me the top 5 ERC20 tokens with the highest total supply, along with their names and contract addresses, but only include tokens where the price is greater than $0.1."
},
{
"role": "assistant",
"content": "SELECT tm.name, tm.contract_address, tm.total_supply, tp... |
You are very professional for database language writing. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.drivers ( driver_id.text, employee_id.text, first_name.text,... | [
{
"role": "user",
"content": "Please provide a list of all driver and passenger pairs who were hired and registered on the same date. Show the driver's full name, the passenger's full name, and the shared date."
},
{
"role": "assistant",
"content": "SELECT d.first_name AS driver_first_name, d.la... |
You are very professional for database language writing. You can write a corresponding 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_... | [
{
"role": "user",
"content": "List all service orders showing the order ID, service ID, quantity, and total price."
},
{
"role": "assistant",
"content": "SELECT order_id, service_id, quantity, total_price FROM hospitality_technology.service_orders LIMIT 100;"
},
{
"role": "user",
"co... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.users ( user_id text PRIMARY KEY, username text, email text, password_h... | [
{
"role": "user",
"content": "How many users have non-empty full_name and bio fields? Return only the count."
},
{
"role": "assistant",
"content": "SELECT COUNT(*)\nFROM social_media.users\nWHERE full_name IS NOT NULL\n AND full_name <> ''\n AND bio IS NOT NULL\n AND bio <> '';"
}
] |
You are very professional for database language writing. You can write a corresponding 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.time_entries ( entry_id text, case_id text, lawyer_id text, ... | [
{
"role": "user",
"content": "List total billable hours and total amount per lawyer for July 2023."
},
{
"role": "assistant",
"content": "SELECT lawyer_id,\n SUM(hours_spent) AS total_hours,\n SUM(hours_spent * billing_rate) AS total_amount\nFROM legal_services.time_entries\nWHERE is... |
You are very professional for database language writing. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.guests ( guest_id text PRIMARY KEY, first_name text,... | [
{
"role": "user",
"content": "Show me the list of guests who were created in 2024, along with their first and last names and registration date."
},
{
"role": "assistant",
"content": "SELECT guest_id, first_name, last_name, created_at FROM hospitality_technology.guests WHERE EXTRACT(YEAR FROM cre... |
You are very professional for database language writing. You can write a corresponding 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 character varying(64) NOT NULL... | [
{
"role": "user",
"content": "How many appointments have a status of 'Cancelled'?"
},
{
"role": "assistant",
"content": "SELECT COUNT(*) FROM legal_services.appointments WHERE status = 'Cancelled';"
}
] |
You are very professional for database language writing. You can write a corresponding 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_num... | [
{
"role": "user",
"content": "For each citizen who has at least one document pending verification and at least one appointment not completed, display the citizen's full name, the document type, the document's upload timestamp, the appointment ID, and the appointment status."
},
{
"role": "assistant"... |
You are very professional for database language writing. You can write a corresponding 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, -... | [
{
"role": "user",
"content": "For all maintenance records, can you show the vehicle's make, model, the odometer reading, and the mechanic's name?"
},
{
"role": "assistant",
"content": "SELECT v.make, v.model, m.odometer_reading, m.mechanic_name FROM transportation.maintenance_logs m JOIN transpo... |
You are very professional for database language writing. You can write a corresponding 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_... | [
{
"role": "user",
"content": "For each property, show the property_name, the total number of available services, and the average price of those services."
},
{
"role": "assistant",
"content": "SELECT p.property_name,\n COUNT(s.service_id) AS total_available_services,\n AVG(s.price) A... |
You are very professional for database language writing. You can write a corresponding 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_h... | [
{
"role": "user",
"content": "Which wallets currently hold more than 200 units of any ERC1155 NFT, and what is the token ID and contract address for each such holding?"
},
{
"role": "assistant",
"content": "SELECT contract_address, token_id, wallet_address, amount FROM nft_holders WHERE contract... |
You are very professional for database language writing. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE trading_platform.kyc_audit (
kyc_audit_id character varying(64) NOT NUL... | [
{
"role": "user",
"content": "Show me the top 5 users with the most KYC audits, along with their latest audit status."
},
{
"role": "assistant",
"content": "SELECT user_id, status, COUNT(*) as audit_count FROM trading_platform.kyc_audit GROUP BY user_id, status ORDER BY audit_count DESC LIMIT 5;... |
You are very professional for database language writing. You can write a corresponding 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... | [
{
"role": "user",
"content": "Show me the usernames of users who have the word 'explorer' in their bio."
},
{
"role": "assistant",
"content": "SELECT username\nFROM social_media.users\nWHERE bio ILIKE '%explorer%';"
}
] |
You are very professional for database language writing. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.players ( player_id uuid NOT NULL DEFAULT gen_random_uuid... | [
{
"role": "user",
"content": "Count the number of servers for each possible status recorded in the servers table."
},
{
"role": "assistant",
"content": "SELECT status, COUNT(server_id) AS server_count FROM gaming_technology.servers GROUP BY status;"
},
{
"role": "user",
"content": "O... |
You are very professional for database language writing. You can write a corresponding 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, n... | [
{
"role": "user",
"content": "List each employee's first and last name along with the count of active services offered by their agency."
},
{
"role": "assistant",
"content": "SELECT e.first_name, e.last_name, COUNT(s.service_id) AS active_service_count\nFROM government_services.employees e\nJOIN... |
You are very professional for database language writing. You can write a corresponding 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... | [
{
"role": "user",
"content": "List reservations, including the reservation ID, check-in date, check-out date, property name, room type name, and room type base rate, for reservations with 3 or more adults."
},
{
"role": "assistant",
"content": "SELECT T1.reservation_id, T1.check_in_date, T1.chec... |
You are very professional for database language writing. You can write a corresponding 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 charac... | [
{
"role": "user",
"content": "For each deployer address, show the total supply of all tokens created by the contracts they deployed."
},
{
"role": "assistant",
"content": "SELECT c.deployer_address, SUM(t.total_supply) AS total_token_supply\nFROM web3.contracts c\nJOIN web3.tokens t ON c.address... |
You are very professional for database language writing. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.trips ( trip_id character varying(64) NOT NULL, route_id cha... | [
{
"role": "user",
"content": "Find consecutive pairs of trips for each vehicle based on the scheduled departure time."
},
{
"role": "assistant",
"content": "WITH RankedTrips AS (\n SELECT\n trip_id,\n vehicle_id,\n scheduled_departure,\n origin_location_id,\n destination_location... |
You are very professional for database language writing. You can write a corresponding 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 text, agency_id text, l... | [
{
"role": "user",
"content": "List the latitude and longitude coordinates for all service locations located in a city named 'Seattle'."
},
{
"role": "assistant",
"content": "SELECT latitude , longitude FROM government_services.service_locations WHERE city = 'Seattle'"
}
] |
You are very professional for database language writing. You can write a corresponding 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_... | [
{
"role": "user",
"content": "What is the average ROI for smart money addresses on the Binance chain?"
},
{
"role": "assistant",
"content": "SELECT AVG(roi) FROM smart_money_profit WHERE chain = 'Binance';"
}
] |
You are very professional for database language writing. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE project_fundraising_record ( id character varying(32) NOT NULL, project_id ... | [
{
"role": "user",
"content": "What is the average profit of smart money addresses whose profit is above $1,000, grouped by chain?"
},
{
"role": "assistant",
"content": "SELECT chain, AVG(profit) AS avg_profit\nFROM smart_money_profit\nWHERE profit > 1000\nGROUP BY chain;"
}
] |
You are very professional for database language writing. You can write a corresponding 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.te... | [
{
"role": "user",
"content": "List all group chat conversations and the number of messages in each group chat."
},
{
"role": "assistant",
"content": "SELECT c.conversation_id,\n c.group_name,\n COUNT(m.message_id) AS message_count\nFROM social_media.conversations c\nJOIN social_media... |
You are very professional for database language writing. You can write a corresponding 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, r... | [
{
"role": "user",
"content": "How many projects raised funds in 2023?"
},
{
"role": "assistant",
"content": "SELECT COUNT(*) AS project_count\nFROM project_fundraising_record\nWHERE investment_date LIKE '2023-%';"
},
{
"role": "user",
"content": "Also provide the average investment_v... |
You are very professional for database language writing. You can write a corresponding 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 N... | [
{
"role": "user",
"content": "For each property, show the number of guests who have checked in since the start of this year."
},
{
"role": "assistant",
"content": "SELECT p.property_name, COUNT(DISTINCT res.guest_id) AS guest_count\nFROM hospitality_technology.reservations res\nJOIN hospitality_... |
You are very professional for database language writing. You can write 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. Key pattern: 'inv:<inventory_record_id>'. Example: HSET inv:INVREC500 compon... | [
{
"role": "user",
"content": "I need to get the inventory quantity and location for a specific batch number. Can you help with that?"
},
{
"role": "assistant",
"content": "HGETALL inv:<inventory_record_id>"
},
{
"role": "user",
"content": "Can you also show me the component ID associ... |
You are very professional for database language writing. You can write a corresponding 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, descr... | [
{
"role": "user",
"content": "What is the average estimated_duration_minutes for each route type?"
},
{
"role": "assistant",
"content": "SELECT type, AVG(estimated_duration_minutes) AS average_duration FROM transportation.routes GROUP BY type;"
},
{
"role": "user",
"content": "Now fi... |
You are very professional for database language writing. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.law_firms ( firm_id text, firm_name text, address text, phon... | [
{
"role": "user",
"content": "Retrieve the invoice_number, issue_date, total_amount, client_id, and case_name for all invoices with status 'Sent' issued between '2024-07-01' and '2024-07-31'. Order the results by issue_date descending."
},
{
"role": "assistant",
"content": "SELECT i.invoice_numb... |
You are very professional for database language writing. You can write a corresponding 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 ... | [
{
"role": "user",
"content": "Which agents have sold policies with a coverage limit over 1,000,000, and what are the policy numbers and their respective coverage limits?"
},
{
"role": "assistant",
"content": "SELECT agent_id, policy_number, coverage_limit FROM insurance.policies WHERE coverage_l... |
You are very professional for database language writing. You can write a corresponding 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, ... | [
{
"role": "user",
"content": "List all smoking rooms, showing the property name, room number, and room type name."
},
{
"role": "assistant",
"content": "SELECT T1.property_name, T2.room_number, T3.type_name FROM hospitality_technology.properties AS T1 JOIN hospitality_technology.rooms AS T2 ON T... |
You are very professional for database language writing. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.law_firms ( firm_id.text, firm_name.text, address.text, phon... | [
{
"role": "user",
"content": "List all law firms that do not have a website registered, including their firm name and phone."
},
{
"role": "assistant",
"content": "SELECT firm_name, phone\nFROM legal_services.law_firms\nWHERE website IS NULL OR website = '';"
}
] |
You are very professional for database language writing. You can write a corresponding 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_... | [
{
"role": "user",
"content": "List the first and last names of all lawyers who have worked on time entries for cases associated with clients from the company 'Innovatech Ltd'."
},
{
"role": "assistant",
"content": "SELECT DISTINCT T1.first_name, T1.last_name FROM legal_services.lawyers AS T1 INN... |
You are very professional for database language writing. You can write a corresponding 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, ... | [
{
"role": "user",
"content": "List all post IDs and their corresponding hashtag names for posts that include media."
},
{
"role": "assistant",
"content": "SELECT ph.post_id, h.tag_name\nFROM social_media.post_hashtags ph\nJOIN social_media.hashtags h ON ph.hashtag_id = h.hashtag_id\nJOIN social_... |
You are very professional for database language writing. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.users ( user_id text PRIMARY KEY, username text, email text, p... | [
{
"role": "user",
"content": "Show the username, full name, and location for all users who registered before January 1, 2024 and are not verified."
},
{
"role": "assistant",
"content": "SELECT username, full_name, location FROM social_media.users WHERE created_at < '2024-01-01' AND is_verified =... |
You are very professional for database language writing. You can write a corresponding 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 character varying(64) NOT NULL, accoun... | [
{
"role": "user",
"content": "List each account number and the total quantity of shares traded through it."
},
{
"role": "assistant",
"content": "SELECT T2.account_number, SUM(T1.quantity) FROM financial_services.trades AS T1 JOIN financial_services.accounts AS T2 ON T1.account_id = T2.account_i... |
You are very professional for database language writing. You can write a corresponding 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, policy_id chara... | [
{
"role": "user",
"content": "Show me the total estimated loss per claim status, and for each status, include the most recent claim's incident date."
},
{
"role": "assistant",
"content": "SELECT status, SUM(estimated_loss) AS total_estimated_loss, MAX(incident_date) AS most_recent_incident_date\... |
You are very professional for database language writing. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.fuel_logs ( fuel_log_id text, vehicle_id text, trip_id text,... | [
{
"role": "user",
"content": "For each vehicle, can you show the vehicle_id, the number of unique fuel types it used, and the maximum quantity recorded in a single fuel log? Only include vehicles that have used more than one type of fuel."
},
{
"role": "assistant",
"content": "SELECT vehicle_id,... |
You are very professional for database language writing. You can write a corresponding 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... | [
{
"role": "user",
"content": "List the usernames of users who have created posts associated with any hashtag, and the name of the hashtag."
},
{
"role": "assistant",
"content": "SELECT\n u.username,\n h.tag_name\nFROM social_media.users AS u\nJOIN social_media.posts AS p\n ON u.user_id = p.us... |
You are very professional for database language writing. You can write a corresponding 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... | [
{
"role": "user",
"content": "List the message_id, content, sender's username, and group_name for all messages in group chats."
},
{
"role": "assistant",
"content": "SELECT m.message_id, m.content, u.username, c.group_name\nFROM social_media.messages m\nJOIN social_media.conversations c ON m.con... |
You are very professional for database language writing. You can write a corresponding 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, policy_id chara... | [
{
"role": "user",
"content": "List all claims that are still pending (status = 'pending') and were reported more than 30 days ago."
},
{
"role": "assistant",
"content": "SELECT claim_id, policy_id, customer_id, reported_date FROM insurance.claims WHERE status = 'pending' AND reported_date < CURR... |
You are very professional for database language writing. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE trading_platform.users ( user_id character varying(64) NOT NULL, username c... | [
{
"role": "user",
"content": "For each asset, show its name and the number of metadata entries associated with it, including assets with zero metadata, sorted by asset name ascending."
},
{
"role": "assistant",
"content": "SELECT a.name, COUNT(m.metadata_id) AS metadata_count\nFROM trading_platf... |
You are very professional for database language writing. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.documents ( document_id text, application_id text, citi... | [
{
"role": "user",
"content": "List the full names of employees who have verified 'Proof of Identity' documents."
},
{
"role": "assistant",
"content": "SELECT DISTINCT T1.first_name, T1.last_name FROM government_services.employees AS T1 JOIN government_services.documents AS T2 ON T1.employee_id =... |
You are very professional for database language writing. You can write a corresponding 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, medi... | [
{
"role": "user",
"content": "Show me the names and manufacturers of all medications that have a description provided."
},
{
"role": "assistant",
"content": "SELECT medication_name, manufacturer FROM healthcare.medications WHERE description IS NOT NULL;"
},
{
"role": "user",
"content... |
You are very professional for database language writing. You can write a corresponding 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, ... | [
{
"role": "user",
"content": "Show me all prescriptions made by doctors who have issued diagnoses described as 'Hypertension'. Include the doctor's ID, prescription ID, medication ID, and prescription date."
},
{
"role": "assistant",
"content": "SELECT p.doctor_id, p.prescription_id, p.medicatio... |
You are very professional for database language writing. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.reservations ( reservation_id character varying(64) ... | [
{
"role": "user",
"content": "Find all reservations where the total amount is greater than 500 and they have at least one service order. Show the reservation ID and the total amount."
},
{
"role": "assistant",
"content": "SELECT DISTINCT T1.reservation_id, T1.total_amount FROM hospitality_techno... |
You are very professional for database language writing. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.law_firms ( firm_id.text, firm_name.text, address.text, phon... | [
{
"role": "user",
"content": "Show me law firms that were founded after 2018 and have a website provided."
},
{
"role": "assistant",
"content": "SELECT firm_name, founded_date, website\nFROM legal_services.law_firms\nWHERE founded_date > '2018-12-31' AND website IS NOT NULL AND website <> '';"
... |
You are very professional for database language writing. You can write a corresponding 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, a... | [
{
"role": "user",
"content": "I need a list of all chronic diagnoses marked as 'Active', showing diagnosis_id, diagnosis_date, doctor_id, and the associated chief_complaint from medical_records."
},
{
"role": "assistant",
"content": "SELECT d.diagnosis_id,\n d.diagnosis_date,\n d.doc... |
You are very professional for database language writing. You can write a corresponding 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 text PRIMARY KEY, user_id text, addres... | [
{
"role": "user",
"content": "Show me the top 5 users who have the highest total trade volume (quantity * price) as buyers, along with their wallet addresses and the number of distinct assets they traded."
},
{
"role": "assistant",
"content": "SELECT t.buyer_id, w.address, COUNT(DISTINCT t.asset... |
You are very professional for database language writing. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.fuel_logs (
fuel_log_id character varying(64) NOT NULL, ... | [
{
"role": "user",
"content": "For each fuel_type, can you calculate the total total_cost and the average total_cost from the fuel_logs table?"
},
{
"role": "assistant",
"content": "SELECT fuel_type,\n SUM(total_cost) AS total_cost_sum,\n AVG(total_cost) AS average_cost\nFROM transpor... |
You are very professional for database language writing. You can write a corresponding 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, -- un... | [
{
"role": "user",
"content": "For each user, list their username and the total number of filled orders they have placed."
},
{
"role": "assistant",
"content": "SELECT u.username, COUNT(o.order_id) AS filled_order_count\nFROM trading_platform.users u\nJOIN trading_platform.orders o ON u.user_id =... |
You are very professional for database language writing. You can write a corresponding 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, dat... | [
{
"role": "user",
"content": "List all female patients born before 1990 who have a phone number listed, showing their full names and contact information."
},
{
"role": "assistant",
"content": "SELECT first_name, last_name, phone_number, email, emergency_contact_name, emergency_contact_phone FROM... |
You are very professional for database language writing. You can write a corresponding 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.text, citizen_id.text, ... | [
{
"role": "user",
"content": "Find pairs of notifications for the same citizen where one was sent via 'Email' and another via 'SMS'. Display citizen_id, email_notification_id, sms_notification_id, email_sent_at, and sms_sent_at."
},
{
"role": "assistant",
"content": "SELECT e.citizen_id,\n ... |
You are very professional for database language writing. You can write a corresponding 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, d... | [
{
"role": "user",
"content": "List the transaction IDs that have both an event and a token transfer, along with the name of the event and the value of the token transfer."
},
{
"role": "assistant",
"content": "SELECT T1.transaction_id, T1.event_name, T2.value FROM web3.events AS T1 JOIN web3.tok... |
You are very professional for database language writing. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE manufacturing.materials (
material_id character varying(64) NOT NULL, ... | [
{
"role": "user",
"content": "特定の材料の詳細情報を取得したいです。材料ID、材料名、仕様、密度を取得してください。"
},
{
"role": "assistant",
"content": "SELECT material_id, material_name, specification, density_kg_m3\nFROM manufacturing.materials\nWHERE material_id = 'specific_material_id';"
},
{
"role": "user",
"content":... |
You are very professional for database language writing. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.achievements ( achievement_id uuid, game_id uuid, name te... | [
{
"role": "user",
"content": "I need to list pairs of achievements within the same game, showing game_id, the name of the first achievement, and the name of the second achievement."
},
{
"role": "assistant",
"content": "SELECT a1.game_id, a1.name AS achievement1, a2.name AS achievement2\nFROM ga... |
You are very professional for database language writing. You can write a corresponding 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, -- un... | [
{
"role": "user",
"content": "Show each asset's symbol and the number of unique addresses that have UTXOs associated with it."
},
{
"role": "assistant",
"content": "SELECT a.symbol, COUNT(DISTINCT u.address) AS unique_addresses\nFROM trading_platform.assets a\nJOIN trading_platform.utxos u ON a.... |
You are very professional for database language writing. You can write a corresponding 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, medi... | [
{
"role": "user",
"content": "Which medications do not have a generic name listed? Show their medication_id, medication_name, and manufacturer."
},
{
"role": "assistant",
"content": "SELECT medication_id, medication_name, manufacturer FROM healthcare.medications WHERE generic_name IS NULL OR gen... |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 3