system stringlengths 315 8.06k | conversations listlengths 2 48 |
|---|---|
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.posts ( post_id.text, user_id.text, content.text, media_url.text, media... | [
{
"role": "user",
"content": "List all post IDs and the corresponding hashtag names where posts were created near latitude 40.0 and longitude -74.0.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.post_id, h.tag_name\nFROM social_media.posts p\nJOIN social_media.post_hashtags ph... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.lawyers ( lawyer_id text PRIMARY KEY, first_name text, last_name text... | [
{
"role": "user",
"content": "List the full name, email, and phone number of all partners together with the full name of a non-partner lawyer in the same law firm.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.first_name AS partner_first_name, p.last_name AS partner_last_name,... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.appointments ( appointment_id.text, patient_id.text, doctor_id.text, appo... | [
{
"role": "user",
"content": "For each location, what is the average appointment duration? Show location_id and the average duration.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT location_id, AVG(duration_minutes) FROM healthcare.appointments GROUP BY location_id;",
"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.citizens ( citizen_id text PRIMARY KEY, national_id_number text,... | [
{
"role": "user",
"content": "List the names of service locations and categories of active services offered by the same agency.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT sl.location_name, s.category\nFROM government_services.service_locations AS sl\nJOIN government_services.... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.doctors ( doctor_id text, first_name text, last_name text, specialty text... | [
{
"role": "user",
"content": "Count the total number of distinct specialties listed in the doctors table.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT count(DISTINCT specialty) FROM healthcare.doctors;",
"sql": null
},
{
"role": "user",
"content": "Show the lice... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.doctors ( doctor_id character varying(64) NOT NULL, first_name character ... | [
{
"role": "user",
"content": "Show all prescriptions with prescription_id, patient_id, medication_id, quantity_dispensed, and refills_allowed.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT prescription_id, patient_id, medication_id, quantity_dispensed, refills_allowed FROM healt... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.medical_records (
record_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "List 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.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n fl.patient_id,\n fr.record_id AS... |
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREA... | [
{
"role": "user",
"content": "What are the environmental impact assessments for the production of the Airbus A350 model?",
"sql": null
},
{
"role": "assistant",
"content": "I'm sorry, but I don't have access to data regarding the environmental impact assessments for the production of specifi... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.wallets ( wallet_id text, user_id text, address text, private_key text, created... | [
{
"role": "user",
"content": "List all pairs of wallets that use the same private_key. Display w1.wallet_id, w1.user_id, w2.wallet_id, w2.user_id, and the shared private_key.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT w1.wallet_id AS wallet1_id,\n w1.user_id AS user1_... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.contracts ( contract_id character varying(64) NOT NULL, address character varyi... | [
{
"role": "user",
"content": "List all events and any token transfers that occurred in the same transaction, showing event_id, event_name, transfer_id, and token_symbol.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n e.event_id,\n e.event_name,\n tt.transfer_id,\n tk.token_... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birt... | [
{
"role": "user",
"content": "Show me all male patients who have received more than one prescription, including their full name, date of birth, and the total number of prescriptions.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.patient_id, p.first_name, p.last_name, p.date_of... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.claims ( claim_id.text, policy_id.text, customer_id.text, incident_date.ti... | [
{
"role": "user",
"content": "List the claim ID, incident date, estimated loss, and the first and last name of the customer for all claims with an estimated loss greater than 5000.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.claim_id, T1.incident_date, T1.estimated_loss, T2... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash text,... | [
{
"role": "user",
"content": "Find all ERC20 tokens (from token_metas) currently held by wallet '0xfoo...' with a balance over 1000. Show the contract address and amount.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT contract_address, amount\nFROM erc20_balances\nWHERE wallet_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 transportation.locations ( location_id character varying(64) NOT NULL, name characte... | [
{
"role": "user",
"content": "Get all pairs of locations in the same city, showing both location IDs, names, and the shared city.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT l1.location_id AS location1_id, l1.name AS location1_name,\n l2.location_id AS location2_id, l2.n... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.cases ( case_id.text, case_number.text, case_name.text, client_id.tex... | [
{
"role": "user",
"content": "How many cases are associated with each unique lead lawyer ID? Show the lead lawyer ID and the count of cases, but only for lawyers who lead at least 5 cases. Sort the results by the case count in descending order.",
"sql": null
},
{
"role": "assistant",
"conten... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE blockchain.addresses ( address_id text PRIMARY KEY, public_key text, balance numeric... | [
{
"role": "user",
"content": "Find users whose username contains 'admin'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT user_id, username, email FROM blockchain.users WHERE username LIKE '%admin%';",
"sql": null
},
{
"role": "user",
"content": "For these users, l... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.customers ( customer_id character varying(64) NOT NULL, first_nam... | [
{
"role": "user",
"content": "List all customers and the total amount they have traded, showing their full name, email, and the total across all their trades. Join customers to their accounts, then to trades.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.customer_id, c.first_n... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.customers ( customer_id text, first_name text, last_name text, da... | [
{
"role": "user",
"content": "For each account type, show the average balance and the number of completed trades associated with accounts of that type.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.account_type, AVG(a.balance) AS average_balance, COUNT(t.trade_id) AS completed... |
You are an expert in writing database language. You can write a corresponding 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... | [
{
"role": "user",
"content": "Can you show me the number of lawyers grouped by specialization?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT specialization, COUNT(*) AS lawyer_count FROM lawyers GROUP BY specialization;",
"sql": null
},
{
"role": "user",
"content... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.user_settings ( setting_id text, user_id text, theme text, email_notifi... | [
{
"role": "user",
"content": "Can you show me all user IDs that have both email and push notifications disabled, along with whether their profile is set to private?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT user_id, private_profile FROM social_media.user_settings WHERE email... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.citizens ( citizen_id character varying(64) NOT NULL, national_i... | [
{
"role": "user",
"content": "Which services have 'Eligibility' mentioned in their eligibility_criteria field?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT service_name, eligibility_criteria\nFROM government_services.services\nWHERE eligibility_criteria ILIKE '%Eligibility%';",... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.documents ( document_id.text, case_id.text, document_name.text, docum... | [
{
"role": "user",
"content": "Find documents that have the same document_name but are associated with different cases. Show the document name and the two different case IDs.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d1.document_name, d1.case_id AS case_id_1, d2.case_id AS ca... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
Node Label ':AircraftModel'. Properties: { model_id: String (Constraint: UNIQUE), model_name: Str... | [
{
"role": "user",
"content": "我想获取某个组件的详细信息,包括组件名称、描述、重量以及成本。",
"sql": null
},
{
"role": "assistant",
"content": "MATCH (c:Component)\nWHERE c.component_id = 'specific_component_id'\nRETURN c.component_name, c.description, c.weight_kg, c.cost_usd",
"sql": null
},
{
"role": "user"... |
You are an expert in writing database language. You can write a corresponding 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, citizen_id text, employee_id... | [
{
"role": "user",
"content": "Can you list all appointments along with the scheduled start time, purpose, and booking method, as well as the employee ID and location ID for each appointment?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT appointment_id, scheduled_start_time, purp... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.vehicles ( vehicle_id text, license_plate text, vin text, make text, ... | [
{
"role": "user",
"content": "Show each vehicle's ID along with another vehicle's ID where they share the same make but have different models. Sort by the first vehicle_id.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT v1.vehicle_id AS vehicle_a, v2.vehicle_id AS vehicle_b\nFROM... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.agents ( agent_id.text, first_name.text, last_name.text, agency_name.text,... | [
{
"role": "user",
"content": "I want to retrieve the agent ID, first and last name, along with their manager's contact email and phone number.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.agent_id,\n a.first_name || ' ' || a.last_name AS agent_name,\n m.contact_em... |
You are an expert in writing database language. You can write 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 platform details. Key format: platform:<platform_id>
// HSET platform:plat_123 ... | [
{
"role": "user",
"content": "Can you help me retrieve the details of all schedules for a specific train with train_id 'train_789', including the route and stops information?",
"sql": null
},
{
"role": "assistant",
"content": "HGETALL train:train_789\nSMEMBERS schedule:sched_*:train:train_78... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
// PUT /schedules
{
"mappings": {
"properties": {
"schedule_id": { "type": "keyword" ... | [
{
"role": "user",
"content": "能否帮我查询特定列车行程(schedule_id 为 'sched_001')的详细信息,包括列车出发和到达时间,以及该行程所属路线的ID和相关乘客信息?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s.schedule_id, s.train_id, s.route_id, s.departure_datetime, s.arrival_datetime, s.status, p.passenger_id, p.first_name, p.la... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.citizens ( citizen_id text PRIMARY KEY, national_id_number text,... | [
{
"role": "user",
"content": "For each service category, show the category and the number of distinct citizens who have scheduled at least one appointment for a service in that category. Order the results by the number of citizens in descending order.",
"sql": null
},
{
"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 trading_platform.wallets ( wallet_id.text, user_id.text, address.text, private_key.t... | [
{
"role": "user",
"content": "List the order ID, type, and quantity for all orders placed using the wallet with ID 'wallet123'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT order_id, order_type, quantity FROM orders WHERE wallet_id = 'wallet123'",
"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.comments ( comment_id text PRIMARY KEY, post_id text, user_id text, par... | [
{
"role": "user",
"content": "Find users who have both commented on a post and liked that same post. Return the user_id and the count of such posts as post_count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.user_id, COUNT(DISTINCT c.post_id) AS post_count\nFROM social_media.... |
You are an expert in writing database language. You can write a corresponding 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... | [
{
"role": "user",
"content": "List all posts where the content mentions 'meeting'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT post_id, user_id, content, created_at FROM social_media.posts WHERE content LIKE '%meeting%'",
"sql": null
},
{
"role": "user",
"conte... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
"CREATE TABLE token_dexpool_info (",
"pair_address character varying(512) NOT NULL, -- the ... | [
{
"role": "user",
"content": "For each chain, find the token with the highest price and the token with the lowest price. List chain, high_price_token, max_price, low_price_token, and min_price.",
"sql": null
},
{
"role": "assistant",
"content": "WITH max_prices AS (\n SELECT chain,\n ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.citizens (
citizen_id character varying(64) NOT NULL, -- un... | [
{
"role": "user",
"content": "Which citizens have made the highest total payments in USD? Show their full name and total payment amount, ordered by total in descending order, limited to the top 3.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.first_name || ' ' || c.last_name A... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.policies (
policy_id character varying(64) NOT NULL, -- unique identif... | [
{
"role": "user",
"content": "List all policies that have been cancelled, showing the policy number, cancellation date, and reason.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT policy_number, cancellation_date, cancellation_reason FROM insurance.policies WHERE status = 'Cancell... |
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, agency_id text, service_... | [
{
"role": "user",
"content": "What is the average and maximum standard fee for services in each category?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT category, AVG(standard_fee) AS avg_standard_fee, MAX(standard_fee) AS max_standard_fee FROM government_services.services 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 social_media.comments (
comment_id character varying(64) NOT NULL, -- unique ide... | [
{
"role": "user",
"content": "List the content and comment ID for all comments made by users with private profiles.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.comment_id, c.content FROM social_media.comments AS c JOIN social_media.user_settings AS us ON c.user_id = us.user_... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.vehicles ( vehicle_id text PRIMARY KEY, license_plate text, vin text,... | [
{
"role": "user",
"content": "For each maintenance log, list the vehicle's license plate, the name of the mechanic, and the service date, ordered by most recent service first.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT ml.log_id, v.license_plate, ml.mechanic_name, ml.service_... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE smart_money_token_inflow ( token_address.text, token_symbol.text, token_amount.numer... | [
{
"role": "user",
"content": "What is the average USD value per address for each narrative across all chains?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n narrative,\n AVG(usd_value / NULLIF(address_amount, 0)) AS avg_usd_per_address\nFROM smart_money_token_inflow\nGROUP BY... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.token_transfers (
transfer_id character varying(64) NOT NULL, -- unique id... | [
{
"role": "user",
"content": "Find cases where an address received tokens in one transfer and then sent tokens in another. List the receive transfer_id, the send transfer_id, the address, and both transfer values.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT recv.transfer_id AS... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.players ( player_id uuid PRIMARY KEY, username text, email text, p... | [
{
"role": "user",
"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.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.player_id, p.username, g.ti... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.users ( user_id text, username text, email text, password_hash text, fu... | [
{
"role": "user",
"content": "Find the latest three posts with their content and posting users' full names.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.content, u.full_name, p.created_at\nFROM social_media.posts p\nJOIN social_media.users u ON p.user_id = u.user_id\nORDER BY... |
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREA... | [
{
"role": "user",
"content": "What is the fuel consumption rate of train number T1234?",
"sql": null
},
{
"role": "assistant",
"content": "I'm sorry, but I don't have information on the fuel consumption rate of train number T1234. The data available in the system only includes details such a... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.clients ( client_id text, first_name text, last_name text, company_na... | [
{
"role": "user",
"content": "List all appointments along with their subject and start time for lawyers specializing in 'Criminal Law'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.subject, T1.start_time FROM legal_services.appointments AS T1 JOIN legal_services.lawyers 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 cex_token_balance (",
"snapshot_time character varying(32) NOT NULL, -- the ... | [
{
"role": "user",
"content": "Which token symbol has the highest price among all tokens held by CEXes on the Polygon chain?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT token_symbol, MAX(price) AS max_price FROM cex_token_balance WHERE chain = 'Polygon' GROUP BY token_symbol OR... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.customers ( customer_id text PRIMARY KEY, first_name text, last_n... | [
{
"role": "user",
"content": "For each account, show the account number, currency, and the sum of all incoming transaction amounts, where an incoming transaction is one where the account appears as related_account_id.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.account_numbe... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.policies ( policy_id character varying(64) NOT NULL, customer_id character... | [
{
"role": "user",
"content": "List all policies that have a coverage limit greater than 750000 and a premium amount greater than 1000. Show the policy number, product ID, coverage limit, and premium amount.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n policy_number,\n produ... |
You are an expert in writing database language. You can write a corresponding 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... | [
{
"role": "user",
"content": "List all insurance plans that will expire within the next 30 days, showing the patient IDs and subscriber names.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT patient_id, subscriber_name, policy_number, expiration_date\nFROM healthcare.patient_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 government_services.agencies ( agency_id.text, agency_name.text, jurisdiction_level.... | [
{
"role": "user",
"content": "Can you list the names of agencies that do not have a parent agency assigned, ordered by their established date?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT agency_id, agency_name, established_date\nFROM government_services.agencies\nWHERE parent_... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE trading_platform.users (
user_id character varying(64) NOT NULL, -- unique iden... | [
{
"role": "user",
"content": "List all users whose usernames start with the letter 'B'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT user_id, username, email, created_at FROM trading_platform.users WHERE username LIKE 'B%';",
"sql": null
},
{
"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 hospitality_technology.services ( service_id text, property_id text, service_name te... | [
{
"role": "user",
"content": "List all food and beverage services (category = 'Food & Beverage') with their names, prices, and units, where the price is less than $20.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT service_name, price, unit FROM hospitality_technology.services WH... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.premium_payments ( payment_id text PRIMARY KEY, policy_id text, customer_i... | [
{
"role": "user",
"content": "Which customers have made more than three premium payments in 2024? Show the customer_id and the number of payments.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT customer_id, COUNT(*) AS payment_count FROM insurance.premium_payments WHERE payment_d... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.routes ( route_id text PRIMARY KEY, route_number text, description te... | [
{
"role": "user",
"content": "Show me the first name, last name, and email address for all passengers who are part of the loyalty program with ID 'Gold'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT first_name , last_name , email FROM transportation.passengers WHERE loyalty_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.patients ( patient_id text PRIMARY KEY, first_name text, last_name text, ... | [
{
"role": "user",
"content": "Find all patients who have never received any diagnoses. Show patient ID, first_name, and last_name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.patient_id,\n p.first_name,\n p.last_name\nFROM healthcare.patients p\nLEFT JOIN healthc... |
You are an expert in writing database language. You can write a corresponding 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... | [
{
"role": "user",
"content": "Show the number of claims filed for each distinct status, ordered by the count in descending order.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT status, COUNT(*) AS claim_count\nFROM insurance.claims\nGROUP BY status\nORDER BY claim_count DESC;",
... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.appointments ( appointment_id.text, client_id.text, lawyer_id.text, c... | [
{
"role": "user",
"content": "Find all pairs of appointments that are scheduled for the same case and overlap in time. Show the IDs of the two overlapping appointments and the shared case ID.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT t1.appointment_id AS appointment1_id, t2.... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.citizens ( citizen_id.text, national_id_number.text, first_name.... | [
{
"role": "user",
"content": "List the citizen ID, full name, and registration date for all unverified citizens who registered in the year 2022.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT citizen_id, first_name, last_name, registration_date FROM government_services.citizens 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 healthcare.diagnoses ( diagnosis_id.text, record_id.text, patient_id.text, doctor_id... | [
{
"role": "user",
"content": "List the diagnosis_id, patient_id, and doctor_id for all diagnoses with status 'Pending' and is_chronic set to TRUE.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT diagnosis_id, patient_id, doctor_id FROM healthcare.diagnoses WHERE status = 'Pending'... |
You are an expert in writing database language. You can write a corresponding 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,... | [
{
"role": "user",
"content": "How many transactions are there for each status?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT status, COUNT(*) AS transaction_count FROM financial_services.transactions GROUP BY status;",
"sql": null
},
{
"role": "user",
"content": ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.payments ( payment_id text, reservation_id text, guest_id tex... | [
{
"role": "user",
"content": "List all payments processed in USD, showing payment_id, guest_id, amount, and payment_timestamp.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT payment_id,\n guest_id,\n amount,\n payment_timestamp\nFROM hospitality_technology.payme... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.fuel_logs (
fuel_log_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "For each trip, provide the trip_id, the total fuel quantity refueled, and the number of refueling events that occurred during the trip.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT trip_id, SUM(quantity) AS total_fuel_quantity, COUNT(*) AS refuel_e... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.locations ( location_id.text, name.text, type.text, address_line1.tex... | [
{
"role": "user",
"content": "List pairs of distinct locations in the same city that share the same location type. Show both location IDs, names, city, and the shared type.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT L1.location_id AS location1_id, L1.name AS location1_name, 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 financial_services.employees (
employee_id character varying(64) NOT NULL, -- u... | [
{
"role": "user",
"content": "List employees whose job title is different from their manager's job title, showing the employee's full name and their manager's full name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT e.first_name, e.last_name, 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 transportation.bookings ( booking_id.text, passenger_id.text, trip_id.text, seat_num... | [
{
"role": "user",
"content": "List the number of bookings for each day.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DATE(booking_time) AS booking_date, COUNT(*) AS booking_count\nFROM transportation.bookings\nGROUP BY DATE(booking_time);\n",
"sql": null
},
{
"role"... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.contracts ( contract_id character varying(64) NOT NULL, address character varyi... | [
{
"role": "user",
"content": "Find the wallet address, user ID, and the contract address of any contract where that wallet is listed as the deployer.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT w.address AS wallet_address, w.user_id, c.address AS contract_address\nFROM web3.wa... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.users (
user_id character varying(64) NOT NULL, -- unique identifi... | [
{
"role": "user",
"content": "How many users have verified profiles and private profiles enabled?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(*) \nFROM social_media.users u\nJOIN social_media.user_settings s ON u.user_id = s.user_id\nWHERE u.is_verified = true AND s.priv... |
You are an expert in writing database language. You can write a corresponding 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... | [
{
"role": "user",
"content": "Which projects that raised funds in 2023 have an associated token, and what are their fundraising amounts, token symbols, and token market caps?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.project_name, T1.investment_value, T2.token_symbol, T2.... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE smart_money_token_performance ( token_address text, token_symbol text, pnl numeric, ... | [
{
"role": "user",
"content": "For each chain, which token symbol has the highest pnl and what are its roi and avg_cost?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT t.chain, t.token_symbol, t.pnl, t.roi, t.avg_cost\nFROM smart_money_token_performance t\nINNER JOIN (\n SELECT 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 social_media.users ( user_id text, username text, email text, password_hash text, fu... | [
{
"role": "user",
"content": "List the usernames and email addresses of users who have published posts with media_type 'video', along with the creation time of each post.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.username, u.email, p.created_at\nFROM social_media.users u\n... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.notifications ( notification_id text PRIMARY KEY, citizen_id tex... | [
{
"role": "user",
"content": "Find application IDs that have received notifications with both a 'Sent' status and a 'Failed' status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT application_id FROM government_services.notifications WHERE status IN ('Sent', 'Failed') GROUP BY ap... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.medications ( medication_id character varying(64) NOT NULL, medication_na... | [
{
"role": "user",
"content": "Show me all medications, their manufacturer, and NDC code for medications manufactured by 'Johnson & Johnson' or 'Roche'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT medication_name, manufacturer, ndc_code FROM healthcare.medications WHERE manufac... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.services ( service_id character varying(64) NOT NULL, agency_id ... | [
{
"role": "user",
"content": "Provide the count of applications grouped by their status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT status, COUNT(*) AS application_count\nFROM government_services.applications\nGROUP BY status;",
"sql": null
},
{
"role": "user",
... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.games ( game_id uuid PRIMARY KEY, title text, developer_id uuid, p... | [
{
"role": "user",
"content": "Show me the title of each game and the total number of game sessions played on servers hosting that game.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT t1.title, count(t3.session_id) FROM gaming_technology.games AS t1 JOIN gaming_technology.servers ... |
You are an expert in writing database language. You can write a corresponding 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... | [
{
"role": "user",
"content": "For each access level, count the number of employees. Return access_level and the corresponding employee_count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT access_level, COUNT(*) AS employee_count FROM government_services.employees GROUP BY access... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE trading_platform.users ( user_id character varying(64) NOT NULL, username character ... | [
{
"role": "user",
"content": "For each peer port, count how many peers have used that port.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT port,\n COUNT(*) AS peer_count\nFROM trading_platform.peers\nGROUP BY port;",
"sql": null
},
{
"role": "user",
"content... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_metas ( block_timestamp.timestamp, block_number.bigint, transaction_hash.text,... | [
{
"role": "user",
"content": "Show me all Sui coins with at least 6 decimal places and status 'exists' from the metadata table. List coin_type, symbol, name, and decimals.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT coin_type, symbol, name, decimals\nFROM sui_coins_metadata\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 transportation.vehicles (
vehicle_id character varying(64) NOT NULL, -- unique ... | [
{
"role": "user",
"content": "I need a list of all routes and the number of trips made on each route.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT route_id, COUNT(*) AS trip_count\nFROM transportation.trips\nGROUP BY route_id;",
"sql": null
},
{
"role": "user",
... |
You are an expert in writing database language. You can write a corresponding 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.policy_beneficiaries ( beneficiary_id text, policy_id text, customer_id te... | [
{
"role": "user",
"content": "List all pairs of beneficiaries on the same policy, showing policy_id, beneficiary1_id, beneficiary1 first_name, beneficiary1 last_name, beneficiary2_id, beneficiary2 first_name, and beneficiary2 last_name.",
"sql": null
},
{
"role": "assistant",
"content": "SEL... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.routes ( route_id text, route_number text, description text, origin_l... | [
{
"role": "user",
"content": "Find all pairs of different routes where the estimated duration in minutes is identical. For each pair, show both route IDs, their route numbers, and the shared duration.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT r1.route_id AS route1_id, r1.rou... |
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, game_id uuid, name... | [
{
"role": "user",
"content": "Show me, for each game, the achievement that has been unlocked by the most players. Include the game title, achievement name, and the number of players who unlocked it.",
"sql": null
},
{
"role": "assistant",
"content": "WITH RankedAchievements AS ( SELECT pa.ac... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.securities (
security_id character varying(64) NOT NULL, -- u... | [
{
"role": "user",
"content": "For each sector, retrieve the ticker symbol and last_updated timestamp of the earliest and latest updated securities, labeling them as earliest_ticker, earliest_updated, latest_ticker, and latest_updated.",
"sql": null
},
{
"role": "assistant",
"content": "WITH ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.trips (
trip_id character varying(64) NOT NULL, -- unique identi... | [
{
"role": "user",
"content": "For each trip, show the trip ID, vehicle ID, driver ID, and both the actual starting and ending location IDs.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT trip_id, vehicle_id, driver_id, origin_location_id, destination_location_id FROM transportati... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.agencies (
agency_id character varying(64) NOT NULL, -- uniq... | [
{
"role": "user",
"content": "List the agency names and addresses for all service locations in the state of 'Florida'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.agency_name, l.address\nFROM government_services.service_locations l\nJOIN government_services.agencies a ON l.a... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.citizens ( citizen_id text, national_id_number text, first_name ... | [
{
"role": "user",
"content": "Find pairs of citizens who have the same last name but different national_id_number.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c1.citizen_id AS citizen_id_1, c1.first_name AS first_name_1, c1.last_name AS last_name_1, c1.national_id_number AS na... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.in_game_items ( item_id uuid NOT NULL DEFAULT gen_random_uuid(), g... | [
{
"role": "user",
"content": "I need to list all pairs of in-game items in the same game where one item is Epic and the other is Legendary, showing game_id, epic_item, and legendary_item.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.game_id,\n a.item_name AS epic_item,\... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.clients (
client_id character varying(64) NOT NULL, -- unique id... | [
{
"role": "user",
"content": "Calculate the total sum of hours spent across all time entries that are billable but have not yet been billed.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT SUM(hours_spent) FROM legal_services.time_entries WHERE is_billable = TRUE AND is_billed = F... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.players ( player_id uuid PRIMARY KEY, username text, email text, p... | [
{
"role": "user",
"content": "List all game titles and the count of online servers hosting each game.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.title, count(T2.server_id) FROM games AS T1 JOIN servers AS T2 ON T1.game_id = T2.game_id WHERE T2.status = 'online' GROUP BY 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 token_basic_info ( coin_id text, token_name text, token_symbol text, token_address t... | [
{
"role": "user",
"content": "Which exchange holds the largest total USD value of the token with the highest 24h price increase in the 'AI' narrative, and what is that value?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT ctb.exchange, SUM(ctb.usd_value) AS total_usd_value\nFROM ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.conversations ( conversation_id text PRIMARY KEY, created_at timestamp,... | [
{
"role": "user",
"content": "Show me all group chats with their names and the time they were last active.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT group_name, last_message_at FROM social_media.conversations WHERE is_group_chat = TRUE;",
"sql": null
},
{
"role":... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.routes ( route_id character varying(64) NOT NULL, route_number charac... | [
{
"role": "user",
"content": "I need a report showing each passenger's total number of bookings and the date of their most recent booking.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT b.passenger_id,\n COUNT(*) AS total_bookings,\n MAX(b.booking_time) AS last_bookin... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.service_locations (
location_id character varying(64) NOT NU... | [
{
"role": "user",
"content": "Find all service locations in the city of 'Albany' that are accessible. Show their IDs, names, and contact phone numbers along with their address.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT location_id, location_name, contact_phone, address 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 transportation.trips ( trip_id character varying(64) NOT NULL, route_id character va... | [
{
"role": "user",
"content": "Show me pairs of trip IDs that used the same vehicle.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n t1.trip_id AS trip1_id,\n t2.trip_id AS trip2_id\nFROM transportation.trips AS t1\nJOIN transportation.trips AS t2\n ON t1.vehicle_id = t2.vehic... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE smart_money_profit ( address character varying(100) NOT NULL, -- the user's address ... | [
{
"role": "user",
"content": "Show me the top 5 smart money addresses by profit on the Ethereum chain, along with their most profitable token and ROI, but only include addresses with a realized profit ratio above 70%.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT address, most_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 hospitality_technology.rooms (
room_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "Show me the average base rate for each room type across all properties. Include the room type name and the calculated average rate.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT type_name, AVG(base_rate) FROM hospitality_technology.room_types 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 hospitality_technology.properties ( property_id text, property_name text, address_li... | [
{
"role": "user",
"content": "Show me all service orders for spa services in the last month, including the guest name and staff who delivered the service.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT so.order_id, g.first_name, g.last_name, s.service_name, st.first_name AS staff... |
You are an expert in writing database language. You can write a corresponding 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, -- unique ide... | [
{
"role": "user",
"content": "List all premium payments along with the customer's first and last name for payments made after July 1, 2023.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT pp.payment_id, pp.payment_date, pp.amount_paid, cu.first_name, cu.last_name\nFROM insurance.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 manufacturing.components (
component_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "我想查询所有使用特定材料ID的组件信息,包括组件名称、零件编号和供应商ID,同时还需要获取该材料的名称和规格。",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.component_id, c.component_name, c.part_number, c.supplier_id, m.material_name, m.specification\nFROM manufacturing.components c\nJOIN manufacturi... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
Index 'component_inventory'. Mapping: { properties: { inventory_record_id: { type: 'keyword' }, c... | [
{
"role": "user",
"content": "特定の倉庫にあるコンポーネントの在庫情報を取得したいです。倉庫の場所、ビンの位置、在庫数量、コンポーネントIDを表示してください。",
"sql": null
},
{
"role": "assistant",
"content": "SELECT location_warehouse, location_bin, quantity, component_id FROM component_inventory WHERE location_warehouse = 'specific_warehouse';",
... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.employees (
employee_id character varying(64) NOT NULL, -- u... | [
{
"role": "user",
"content": "List the full names of all employees who are currently employed (i.e., have no termination date).",
"sql": null
},
{
"role": "assistant",
"content": "SELECT first_name || ' ' || last_name AS full_name FROM government_services.employees WHERE termination_date IS ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_basic_info ( coin_id character varying(100) NOT NULL, -- the id of the token t... | [
{
"role": "user",
"content": "Show me all tokens which have a 6-hour price change percentage above 2% and the current price, on the Arbitrum chain.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT token_symbol, price, price_change_percentage_6h\nFROM token_dexpool_info\nWHERE chain... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.