system stringlengths 325 7.68k | conversations listlengths 2 8 |
|---|---|
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_dexpool_info ( pair_address character varying(512) NOT NULL, -- the id of dexp... | [
{
"role": "user",
"content": "Compute the average realized_ratio and average pnl for smart money token performance grouped by chain.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT chain, AVG(realized_ratio) AS avg_realized_ratio, AVG(pnl) AS avg_pnl\nFROM smart_money_token_perfor... |
You are an expert in writing database language. You can write a corresponding 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.assets ( asset_id text PRIMARY KEY, name text, symbol text, type te... | [
{
"role": "user",
"content": "List all asset symbols where the asset type is 'token'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT symbol FROM trading_platform.assets WHERE type = 'token';",
"sql": null
}
] |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.fuel_logs ( fuel_log_id.text, vehicle_id.text, trip_id.text, log_time... | [
{
"role": "user",
"content": "Show me the number of fuel logs per location, including the location name and city.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT fl.location_id, loc.name AS location_name, loc.city, COUNT(*) AS fuel_log_count\nFROM transportation.fuel_logs fl\nJOIN... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.premium_payments (
payment_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "How many premium payments are currently in 'Pending' status?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(*) FROM insurance.premium_payments WHERE status = 'Pending';",
"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
Node Label ':AircraftModel'. Properties: { model_id: String (Constraint: UNIQUE), model_name: Str... | [
{
"role": "user",
"content": "我想查询某个飞机型号的所有构建信息,包括构建的开始日期、预计完成日期以及所在的装配线名称和位置。",
"sql": null
},
{
"role": "assistant",
"content": "MATCH (am:AircraftModel)-[:IS_MODEL]-(ab:AircraftBuild)-[:ASSEMBLED_ON]->(al:AssemblyLine)\nWHERE am.model_id = 'specific_model_id'\nRETURN ab.build_id, ab.build... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.clients ( client_id text, first_name text, last_name text, company_na... | [
{
"role": "user",
"content": "List all pairs of clients who registered in the same year. Show each client's first_name, last_name, and the registration year.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c1.first_name AS first_name_1, c1.last_name AS last_name_1, c2.first_name A... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.premium_payments (
payment_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "Find all pairs of overlapping payment periods for the same customer. Return customer_id, first payment_id as payment1_id, second payment_id as payment2_id, and both periods' start and end dates.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p1.custo... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.citizens (
citizen_id character varying(64) NOT NULL, -- un... | [
{
"role": "user",
"content": "List the first name and last name of employees who were hired in the year 2023, along with the name of the agency they work for.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT e.first_name, e.last_name, a.agency_name FROM government_services.employee... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE erc1155_approval_for_all (
block_number bigint NOT NULL, -- Block number contain... | [
{
"role": "user",
"content": "For each Sui NFT with status 'exists', show its object ID, collection type, and owner.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT object_id, collection_type, owner FROM sui_nfts WHERE status = 'exists';",
"sql": null
},
{
"role": "use... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.properties ( property_id text, property_name text, address_li... | [
{
"role": "user",
"content": "List the property_name and the total number of rooms that are designated as smoking rooms for each property.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.property_name, COUNT(*) AS smoking_room_count\nFROM hospitality_technology.rooms r\nJOIN hos... |
You are an expert in writing database language. You can write a corresponding 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": "Show me the content of all comments that have received at least one like.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT T1.content FROM social_media.comments AS T1 JOIN social_media.likes AS T2 ON T1.comment_id = T2.comment_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 legal_services.clients (
client_id character varying(64) NOT NULL, -- unique id... | [
{
"role": "user",
"content": "List all documents uploaded for cases handled in the 'District Court' jurisdiction, showing the document name, case number, and upload timestamp.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d.document_name, cs.case_number, d.upload_timestamp\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 financial_services.securities ( security_id character varying(64) NOT NULL, ticker_s... | [
{
"role": "user",
"content": "List all securities (security_id, ticker_symbol, issuer_name) where the currency is 'EUR' and the security_type is 'Equity', along with their exchange information.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT security_id, ticker_symbol, issuer_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.vehicles ( vehicle_id character varying(64) NOT NULL, license_plate c... | [
{
"role": "user",
"content": "Give me the vehicle ID, make, model, year, and the total number of trips made by each vehicle.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT v.vehicle_id, v.make, v.model, v.year, COUNT(t.trip_id) AS total_trips\nFROM transportation.vehicles v\nLEFT... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.players ( player_id uuid NOT NULL DEFAULT gen_random_uuid(), usern... | [
{
"role": "user",
"content": "For each player, show their username and the total number of unique in-game items they have in their inventory.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.username, COUNT(DISTINCT pi.item_id) AS unique_items\nFROM gaming_technology.players p\nJ... |
You are an expert in writing database language. You can write a corresponding 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 legal_services.invoices ( invoice_id.text, invoice_number.text, client_id.text, case... | [
{
"role": "user",
"content": "Show me invoices where the total amount is greater than 5000. Display the invoice number, total amount, and client ID.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT invoice_number, total_amount, client_id FROM invoices WHERE total_amount > 5000;",
... |
You are an expert in writing database language. You can write a corresponding 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_hash text... | [
{
"role": "user",
"content": "List all users who have pending orders for cryptocurrency assets, along with the asset_id and order quantity.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.user_id, u.email, o.asset_id, o.quantity FROM trading_platform.users u JOIN trading_platfor... |
You are an expert in writing database language. You can write a corresponding 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": "Show all beneficiaries assigned to policy ID 'POL67890', with their first and last names, relationship, and the date they were added.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT first_name, last_name, relationship, added_at\nFROM insurance.policy_... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.accounts ( account_id text, customer_id text, account_number text... | [
{
"role": "user",
"content": "For each account, show account_number, customer_id, and the count of other accounts the same customer has.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.account_number, a.customer_id, COUNT(b.account_id) AS other_account_count FROM financial_servi... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.in_game_items ( item_id.uuid, game_id.uuid, item_name.text, item_t... | [
{
"role": "user",
"content": "Find pairs of items from the same game, where one item is of type 'Weapon' and the other is of type 'Consumable'. List the game ID, the name of the weapon, and the name of the consumable.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT i1.game_id, i1.... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.patients ( patient_id character varying(64) NOT NULL, first_name characte... | [
{
"role": "user",
"content": "Show me all patients who have had prescriptions for a medication named 'Metformin', including their full name, prescription date, and prescribing doctor's ID.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.patient_id, p.first_name, p.last_name, pr.... |
You are an expert in writing database language. You can write a corresponding 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": "What is the average age of customers by risk_profile for those in status 'Active'?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT risk_profile,\n AVG(DATE_PART('year', AGE(CURRENT_DATE, date_of_birth))) AS avg_age\nFROM financial_services.custo... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.developers ( developer_id uuid PRIMARY KEY, name text, country tex... | [
{
"role": "user",
"content": "How many developers are there in each country? Show country and developer_count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT country,\n COUNT(*) AS developer_count\nFROM gaming_technology.developers\nGROUP BY country;",
"sql": null
},
... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE smart_money_token_performance ( token_address text, token_symbol text, pnl numeric, ... | [
{
"role": "user",
"content": "List all pairs of tokens on the same chain where one has positive net_flow and another has negative net_flow, showing their symbols and net_flows.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.chain,\n a.token_symbol AS token_pos,\n a.... |
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 current job satisfaction level or feedback from staff members working at a specific train station?",
"sql": null
},
{
"role": "assistant",
"content": "I'm sorry, but I can't provide information on job satisfaction levels or feedback from staff member... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.citizens (
citizen_id character varying(64) NOT NULL, -- un... | [
{
"role": "user",
"content": "List the first name and last name of citizens who have scheduled appointments at accessible service locations, along with the scheduled start time of the appointment and the location name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.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 social_media.users (
user_id character varying(64) NOT NULL, -- unique identifi... | [
{
"role": "user",
"content": "Show me the usernames and full names of all users who have liked at least one post that was created in May 2024.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT u.username, u.full_name\nFROM social_media.users u\nJOIN social_media.likes l ON ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.accounts ( account_id.text, customer_id.text, account_number.text... | [
{
"role": "user",
"content": "Show each customer's checking and savings account numbers for customers who have both types.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.customer_id,\n a.account_number AS checking_account,\n b.account_number AS savings_account\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
Node Label ':Component'. Properties: { component_id: String (Constraint: UNIQUE), part_number: St... | [
{
"role": "user",
"content": "Can you help me get a list of inspections performed on a specific aircraft build, including the employee who performed them and the inspected component details?",
"sql": null
},
{
"role": "assistant",
"content": "MATCH (ab:AircraftBuild {build_id: 'specific_buil... |
You are an expert in writing database language. You can write a corresponding 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": "List the top 5 ERC20 tokens by total_supply along with their latest USD price.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT tm.symbol, tm.contract_address, tm.total_supply, tpl.price\nFROM token_metas tm\nJOIN token_prices_latest tpl ON tm.contract... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.cases (
case_id character varying(64) NOT NULL, -- unique identi... | [
{
"role": "user",
"content": "List all documents which have a version greater than 2, along with the case number and name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d.document_id, d.document_name, d.version, c.case_number, c.case_name\nFROM legal_services.documents d\nJOIN 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 token_basic_info ( coin_id character varying(100) NOT NULL, token_name character var... | [
{
"role": "user",
"content": "Show the top 3 tokens on Polygon with the greatest positive price change over the last 6 hours, including their symbol, price, 6h change, and the number of smart money buy addresses in the last 24h.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT tdi.... |
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, username text, email text, passwo... | [
{
"role": "user",
"content": "For each user, show their user_id, username, and the total number of trades they have participated in, counting both as buyer and as seller.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n u.user_id,\n u.username,\n COALESCE(b.buy_count, 0) + COA... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.policies ( policy_id.text, customer_id.text, product_id.text, agent_id.tex... | [
{
"role": "user",
"content": "List the payment_id, amount_paid, and payment_date for all premium payments with an amount above 2500.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT payment_id, amount_paid, payment_date\nFROM insurance.premium_payments\nWHERE amount_paid > 2500;",
... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.customers ( customer_id.text, first_name.text, last_name.text, date_of_bir... | [
{
"role": "user",
"content": "Find all customers whose email address ends with '@gmail.com'. Please show the customer_id, first name, and email.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT customer_id, first_name, email FROM insurance.customers WHERE email LIKE '%@gmail.com';"... |
You are an expert in writing database language. You can write a corresponding 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 text, route_id text, vehicle_id text, driver_id text,... | [
{
"role": "user",
"content": "For each origin and destination location pair, provide the total number of trips along with the average actual_arrival time.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT origin_location_id, destination_location_id, COUNT(*) AS trip_count, AVG(EXTRA... |
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, policy_id text, cu... | [
{
"role": "user",
"content": "How many beneficiaries has each unique relationship type? List relationship and the count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT relationship, COUNT(*) AS beneficiary_count\nFROM insurance.policy_beneficiaries\nGROUP BY relationship;",
"... |
You are an expert in writing database language. You can write a corresponding 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": "Find all distinct pairs of customers having the same first_name but living in different cities. Display a.customer_id, a.first_name, a.city AS city_a, b.customer_id, b.city AS city_b.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.customer_id AS cu... |
You are an expert in writing database language. You can write a corresponding 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": "List the route number, origin city, and destination city for all routes that have bookings associated with them.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT r.route_number, l_origin.city AS origin_city, l_dest.city AS destination_city\nFR... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.game_sessions ( session_id uuid, player_id uuid, game_id uuid, ser... | [
{
"role": "user",
"content": "Show me all game sessions that do not have a score recorded. List the session_id, player_id, game_id, and start_time.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT session_id, player_id, game_id, start_time FROM gaming_technology.game_sessions WHERE... |
You are an expert in writing database language. You can write a corresponding 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": "Show me all loans with matching collateral, displaying loan_id, principal_amount, the collateral ticker, and its sector.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n l.loan_id,\n l.principal_amount,\n s.ticker_symbol,\n s.sector\nFROM financi... |
You are an expert in writing database language. You can write a corresponding 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": "Retrieve all prescriptions for patient 'patient_007', showing prescription_id, medication_id, start_date, and end_date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT prescription_id, medication_id, start_date, end_date\nFROM healthcare.prescriptions... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.contracts (
contract_id character varying(64) NOT NULL, -- unique identifi... | [
{
"role": "user",
"content": "Show all contracts and the names of all events they have ever emitted. Include contract_id, contract address, and event_name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.contract_id, c.address, e.event_name\nFROM web3.contracts c\nJOIN web3.even... |
You are an expert in writing database language. You can write a corresponding 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 all unspent UTXOs with an amount greater than 10.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT utxo_id, transaction_id, address, amount FROM utxos WHERE spent = FALSE AND amount > 10;",
"sql": null
}
] |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.properties ( property_id text, property_name text, address_li... | [
{
"role": "user",
"content": "List all public reviews that have a staff response, showing the review ID, overall rating, and the full name of the staff member who responded.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.review_id, T1.rating_overall, T2.first_name, T2.last_nam... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.user_settings ( setting_id text, user_id text, theme text, email_notifi... | [
{
"role": "user",
"content": "Show the user IDs of all users whose theme is set to 'blue'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT user_id FROM social_media.user_settings WHERE theme = 'blue';",
"sql": null
}
] |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.insurance_products ( product_id text PRIMARY KEY, product_name text, produ... | [
{
"role": "user",
"content": "Give me the product name and description of all insurance products that have been updated in the last 30 days.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT product_name, description FROM insurance.insurance_products WHERE updated_at >= NOW() - INTE... |
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, patient_id text, doctor_i... | [
{
"role": "user",
"content": "How many appointments are scheduled at each location?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT location_id, COUNT(*) AS scheduled_count FROM healthcare.appointments WHERE status = 'scheduled' GROUP BY location_id;",
"sql": null
}
] |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.clients ( client_id text PRIMARY KEY, first_name text, last_name text... | [
{
"role": "user",
"content": "Show me each law firm's ID, name, managing_partner_id, and the number of appointments scheduled with that managing partner.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT f.firm_id, \n f.firm_name, \n f.managing_partner_id, \n COUNT... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.hashtags (
hashtag_id character varying(64) NOT NULL, -- unique ide... | [
{
"role": "user",
"content": "How many hashtags are currently stored in the hashtags table?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(*) AS total_hashtags\nFROM social_media.hashtags;",
"sql": null
}
] |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.securities ( security_id text PRIMARY KEY, ticker_symbol text, is... | [
{
"role": "user",
"content": "Can you provide a summary of how many securities exist for each combination of exchange and sector?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT exchange, sector, COUNT(*) AS total_count\nFROM financial_services.securities\nGROUP BY exchange, secto... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.games (
game_id uuid NOT NULL DEFAULT gen_random_uuid(), -- un... | [
{
"role": "user",
"content": "I want to identify pairs of games developed by the same developer but available on different platforms. Include the titles and platforms of both games.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT g1.game_id AS game1_id,\n g1.title AS game1_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 financial_services.transactions ( transaction_id text, account_id text, related_acco... | [
{
"role": "user",
"content": "For each loan, show the loan_id, the account_id, the principal_amount, and the ticker_symbol and security_name of any associated collateral, if the collateral_description matches a security's ticker_symbol.",
"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 gaming_technology.servers ( server_id uuid NOT NULL DEFAULT gen_random_uuid(), game_... | [
{
"role": "user",
"content": "I want to compare servers within the same region. List pairs of servers where one has fewer current_players than the other. Include each server's name, region, and their current_players counts.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s1.server... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.staff ( staff_id text, property_id text, first_name text, las... | [
{
"role": "user",
"content": "For each service order, list the order_id, reservation_id, the full name of the staff who ordered it as ordered_by, and the full name of the staff who delivered it as delivered_by.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT so.order_id,\n s... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE erc20_balances ( block_number bigint, contract_address text, wallet_address text, am... | [
{
"role": "user",
"content": "Show me all NFT collections on the 'Ethereum' blockchain, listing their name, contract address, and ERC type.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT name, contract_address, erc_type FROM nft_collections WHERE blockchain = 'Ethereum'",
"sq... |
You are an expert in writing database language. You can write a corresponding 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": "Provide a count of locations for each country listed in the table.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT country, COUNT(*) FROM transportation.locations GROUP BY country",
"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.follows ( follow_id.text, follower_user_id.text, following_user_id.text... | [
{
"role": "user",
"content": "Show me all users who started following someone in May 2024, along with both the user ID of the follower and the followed user.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT follower_user_id, following_user_id\nFROM social_media.follows\nWHERE creat... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.patients ( patient_id character varying(64) NOT NULL, first_name characte... | [
{
"role": "user",
"content": "Show the name of each insurance plan and the total number of patients whose primary insurance policy for that plan is currently active. Include only plans that have at least one such patient.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.plan_nam... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.clients ( client_id text PRIMARY KEY, first_name text, last_name text... | [
{
"role": "user",
"content": "List all documents along with the document type and the case name they are associated with.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d.document_name, d.document_type, c.case_name\nFROM legal_services.documents d\nJOIN legal_services.cases c ON ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.events ( event_id character varying(64) NOT NULL, contract_id character varying... | [
{
"role": "user",
"content": "Find all pairs of events that occurred in the same transaction but at different log indices, showing both event_ids, their event_names, the transaction_id, and each log_index.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.event_id AS event_id1,\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 project_fundraising_record ( id character varying(32) NOT NULL, -- fundraising reco... | [
{
"role": "user",
"content": "Which tokens have a current price above $20 and belong to the 'DeFi' narrative?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT token_symbol, token_name, chain, price\nFROM token_basic_info\nWHERE price > 20 AND narrative = 'DeFi';",
"sql": null
... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.room_types ( room_type_id text, property_id text, type_name t... | [
{
"role": "user",
"content": "List each payment's currency_code, total amount paid, and the number of service orders placed by the same guest for the same reservation.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.payment_id,\n p.currency_code,\n p.amount AS paymen... |
You are an expert in writing database language. You can write a corresponding 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 hospitality_technology.reservations ( reservation_id.text, property_id.text, guest_i... | [
{
"role": "user",
"content": "How many reservations does each property have?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT property_id,\n COUNT(*) AS reservation_count\nFROM hospitality_technology.reservations\nGROUP BY property_id;",
"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 smart_money_profit ( address text, rank numeric, profit numeric, roi numeric, realiz... | [
{
"role": "user",
"content": "Which addresses across all chains have a realized ratio above 0.9 and a profit above $20,000? Show their address, chain, profit, realized ratio, and most profitable token.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT address, chain, profit, realize... |
You are an expert in writing database language. You can write a corresponding 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": "Show me each lawyer’s full name and the count of distinct cases they have logged time against.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT l.first_name || ' ' || l.last_name AS lawyer_name, COUNT(DISTINCT te.case_id) AS case_count\nFROM legal_serv... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE erc1155_approval_for_all (
block_number bigint NOT NULL, -- Block number contain... | [
{
"role": "user",
"content": "List all wallet addresses holding NFTs for contract_address '0xABC123...' along with the token name from metadata.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT h.wallet_address, h.token_id, m.name AS token_name\nFROM nft_holders h\nJOIN nft_metadat... |
You are an expert in writing database language. You can write a corresponding 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": "How many citizens are there in each gender?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT gender, COUNT(*) AS citizen_count\nFROM government_services.citizens\nGROUP BY gender;",
"sql": null
},
{
"role": "user",
"content": "Filter to... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.servers ( server_id uuid, game_id uuid, server_name text, region t... | [
{
"role": "user",
"content": "Show me all servers where current_players is 0, and include their server_id, server_name, and region.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT server_id, server_name, region FROM gaming_technology.servers WHERE current_players = 0;",
"sql":... |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 2