system stringlengths 315 8.44k | conversations listlengths 2 8 |
|---|---|
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.rooms (
room_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "List all rooms along with their room type names and base rates for rooms that are currently 'Available'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT r.room_id, r.room_number, rt.type_name, rt.base_rate\nFROM hospitality_technology.rooms r\nJOIN ho... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.agencies ( agency_id text, agency_name text, jurisdiction_level ... | [
{
"role": "user",
"content": "Provide a count of agencies grouped by their jurisdiction level.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT jurisdiction_level, COUNT(*) FROM government_services.agencies GROUP BY jurisdiction_level;",
"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.posts ( post_id.text, user_id.text, content.text, media_url.text, media... | [
{
"role": "user",
"content": "List all notifications related to messages. Please show notification_id, recipient_user_id, conversation_id, and the creation time.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT notification_id, recipient_user_id, target_entity_id AS conversation_id... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.policies ( policy_id text, customer_id text, product_id text, agent_id tex... | [
{
"role": "user",
"content": "How many beneficiaries exist for each relationship type in the policy_beneficiaries table? Return relationship and beneficiary_count, ordered by count descending.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT relationship, COUNT(*) AS beneficiary_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 government_services.agencies ( agency_id text PRIMARY KEY, agency_name text, jurisdi... | [
{
"role": "user",
"content": "Count the number of active services provided by each agency. Return the agency_name and the count of active services for each.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.agency_name, COUNT(*) AS active_service_count\nFROM government_services.ag... |
You are an expert in writing database language. You can write a corresponding 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.wallets ( wallet_id.text, user_id.text, address.text, private_key.text, created... | [
{
"role": "user",
"content": "List all pairs of wallet IDs where both wallets were created on the same day but belong to different users, showing the user IDs and the creation date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT w1.wallet_id AS wallet_id_1, w2.wallet_id AS wallet... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash varch... | [
{
"role": "user",
"content": "List all Bitcoin token ticks and their creators from token_info_bitcoin.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT tick, creator\nFROM token_info_bitcoin;",
"sql": null
},
{
"role": "user",
"content": "Include the total amount he... |
You are an expert in writing database language. You can write a corresponding 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.hashtags ( hashtag_id.text, tag_name.text, created_at.timestamp )
CREAT... | [
{
"role": "user",
"content": "List conversation IDs and their creation times for all conversations that have not had any new messages in 2024.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT conversation_id, created_at\nFROM social_media.conversations\nWHERE last_message_at < '202... |
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, reservation_id text, ... | [
{
"role": "user",
"content": "Find the total amount of payments and the number of payments for each status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT status, SUM(amount) AS total_amount, COUNT(*) AS payment_count\nFROM hospitality_technology.payments\nGROUP BY status;",
... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.trades (
trade_id character varying(64) NOT NULL, -- unique i... | [
{
"role": "user",
"content": "List the total traded amount and total commission for each security, including the security name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s.security_id, s.security_name, SUM(t.total_amount) AS total_traded_amount, SUM(t.commission) AS total_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 government_services.citizens ( citizen_id text PRIMARY KEY, national_id_number text,... | [
{
"role": "user",
"content": "Retrieve the service names, location names, and cities for active services offered at accessible locations in California.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s.service_name,\n sl.location_name,\n sl.city\nFROM government_servic... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE erc1155_approval_for_all ( block_number bigint, block_timestamp timestamp, transacti... | [
{
"role": "user",
"content": "Show me the current ERC20 token balances for the wallet address '0x1A2b3C4dE5f6A7b8C9d0E1f2A3b4C5d6E7f8A9b0'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT contract_address, amount FROM erc20_balances WHERE wallet_address = '0x1A2b3C4dE5f6A7b8C9d0E1... |
You are an expert in writing database language. You can write a corresponding 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": "Could you list each game title along with the server names that host them?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT g.title, s.server_name FROM gaming_technology.games g JOIN gaming_technology.servers s ON g.game_id = s.game_id;",
"sql": nu... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.properties ( property_id character varying(64) NOT NULL, prop... | [
{
"role": "user",
"content": "List all available rooms with their room number, property_name, type_name, and the number of days since they were last cleaned.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.property_name,\n r.room_number,\n rt.type_name,\n date_... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.users (
user_id character varying(64) NOT NULL, -- unique identifi... | [
{
"role": "user",
"content": "Show me the full names and email addresses of users who have received notifications of type 'mention', and the notification creation time.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.full_name, u.email, n.created_at\nFROM social_media.notificati... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE smart_money_token_performance ( token_address text, token_symbol text, pnl numeric, ... | [
{
"role": "user",
"content": "What is the total net_flow and average realized_ratio for tokens on the Polygon chain?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT SUM(net_flow) AS total_net_flow, AVG(realized_ratio) AS avg_realized_ratio\nFROM smart_money_token_performance\nWHER... |
You are an expert in writing database language. You can write a corresponding 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": "For each service location, show the location name, city, and the number of appointments scheduled at that location.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT sl.location_name, sl.city, COUNT(a.appointment_id) AS appointment_count\nFROM governmen... |
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, first_name text, last_name text, sp... | [
{
"role": "user",
"content": "Show me the names and manufacturers of all medications whose description contains the word 'ointment'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT medication_name, manufacturer\nFROM healthcare.medications\nWHERE description ILIKE '%ointment%';",
... |
You are an expert in writing database language. You can write a corresponding 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": "Show me all users who have wallets but have never placed any orders, along with their wallet addresses.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.user_id, u.username, u.email, w.address FROM trading_platform.users u JOIN trading_platform.walle... |
You are an expert in writing database language. You can write a corresponding 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 text PRIMARY KEY, first_name text, last_name text... | [
{
"role": "user",
"content": "Show me all clients who have appointments with lawyers from law firms located at the same address as their own company. I want to see the client's first and last name, company name, the lawyer's name, the law firm's name, and the shared address.",
"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 trading_platform.users ( user_id.text, username.text, email.text, password_hash.text... | [
{
"role": "user",
"content": "Show each wallet address, the user who owns it, and the number of UTXOs associated with that address.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT w.address, w.user_id, COUNT(u.utxo_id) AS utxo_count\nFROM trading_platform.wallets w\nLEFT JOIN trad... |
You are an expert in writing database language. You can write a corresponding 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 all applications that have at least one document with a verification status of 'Verified'. Show the application reference number and the name of the service associated with the application.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n T1.re... |
You are an expert in writing database language. You can write a corresponding 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 government_services.citizens ( citizen_id.text, national_id_number.text, first_name.... | [
{
"role": "user",
"content": "Retrieve the service name and the count of applications currently in 'Under Review' status for each service.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s.service_name, COUNT(a.application_id) AS under_review_count\nFROM government_services.servic... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.customers ( customer_id.text, first_name.text, last_name.text, da... | [
{
"role": "user",
"content": "Show me all employees (employee_id, first_name, last_name) in the 'Investment' department who have processed loans (loan_id) with a principal amount greater than $100,000, along with the count of such loans for each employee.",
"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
// db.createCollection('platforms')
// Optional: db.platforms.createIndex({ platform_id: 1 }, { u... | [
{
"role": "user",
"content": "Can you help me get the total number of operational platforms across all stations?",
"sql": null
},
{
"role": "assistant",
"content": "db.platforms.countDocuments({ status: 'Operational' });",
"sql": null
}
] |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.users ( user_id text, username text, email text, password_hash text, fu... | [
{
"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. You can write a corresponding 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 the first name, last name, and email for guests residing in California.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT first_name, last_name, email FROM hospitality_technology.guests WHERE state_province = 'CA'",
"sql": null
},
{
"ro... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.drivers ( driver_id text PRIMARY KEY, employee_id text, first_name te... | [
{
"role": "user",
"content": "Retrieve the driver_id, first_name, and last_name for all drivers whose license_expiry_date falls within the next 6 months from today.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT driver_id, first_name, last_name\nFROM transportation.drivers\nWHERE... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.properties (
property_id character varying(64) NOT NULL, ... | [
{
"role": "user",
"content": "For each property, show the property name and the count of staff members with the position 'Manager'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n p.property_name,\n COUNT(s.staff_id) AS manager_count\nFROM hospitality_technology.properties 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 hospitality_technology.properties ( property_id text, property_name text, address_li... | [
{
"role": "user",
"content": "List all services, showing the service name, category, and the name of the property where it is offered.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.service_name, T1.category, T2.property_name FROM hospitality_technology.services AS T1 JOIN 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.conversations ( conversation_id.text, created_at.timestamp, last_messag... | [
{
"role": "user",
"content": "I want to see for each group chat the count of unread 'mention' notifications received by its recipients. Include conversation_id, group_name, and unread_mentions.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.conversation_id,\n c.group_name... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.patients ( patient_id text PRIMARY KEY, first_name text, last_name text, ... | [
{
"role": "user",
"content": "How many patients are there in each gender category?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT gender, COUNT(*) AS patient_count\nFROM healthcare.patients\nGROUP BY gender;",
"sql": null
},
{
"role": "user",
"content": "Now only ... |
You are an expert in writing database language. You can write 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 retrieve the details of all components supplied by suppliers from a specific country, along with the supplier's contact information?",
"sql": null
},
{
"role": "assistant",
"content": "MATCH (c:Component)-[:SUPPLIED_BY]->(s:Supplier)\nWHERE s.cou... |
You are an expert in writing database language. You can write a corresponding 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, title text, developer_id uuid, publisher_id ... | [
{
"role": "user",
"content": "I would like to get the total number of sessions and the average score for each game, showing game_id and title.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT g.game_id, g.title, COUNT(gs.session_id) AS total_sessions, AVG(gs.score) AS average_score... |
You are an expert in writing database language. You can write a corresponding 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": "Which agencies offer more than one type of service category? List the agency_id and the number of distinct categories they provide.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT agency_id, COUNT(DISTINCT category) AS category_count FROM government_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 legal_services.lawyers ( lawyer_id.text, first_name.text, last_name.text, bar_number... | [
{
"role": "user",
"content": "Show me the number of lawyers for each law firm, along with the firm's ID.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT firm_id, COUNT(*) AS lawyer_count FROM legal_services.lawyers GROUP BY firm_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.insurance_products ( product_id.text, product_name.text, product_type.text... | [
{
"role": "user",
"content": "List the policy ID, beneficiary first name, beneficiary last name, relationship, and the product name for all policy beneficiaries.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.policy_id, T1.first_name, T1.last_name, T1.relationship, T2.product_... |
You are an expert in writing database language. You can write a corresponding 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": "Could you get the total spend on rare items for each player along with the player's username?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.player_id,\n p.username,\n SUM(pi.quantity * i.cost_amount) AS total_spend\nFROM gaming_technol... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.vehicles ( vehicle_id text, license_plate text, vin text, make text, ... | [
{
"role": "user",
"content": "Show a list of all fuel refueling events for each trip, including the trip ID, fuel type, quantity, total cost, and the name of the refueling location.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT fl.trip_id, fl.fuel_type, fl.quantity, fl.total_cos... |
You are an expert in writing database language. You can write a corresponding 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": "Find consecutive pairs of trips for each vehicle based on the scheduled departure time.",
"sql": null
},
{
"role": "assistant",
"content": "WITH RankedTrips AS (\n SELECT\n trip_id,\n vehicle_id,\n scheduled_departure,\n origin_location_id,\n des... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.medications ( medication_id text PRIMARY KEY, medication_name text, gener... | [
{
"role": "user",
"content": "Show me each generic_name and the number of medications with that generic_name, sorted by the highest count first.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT generic_name, COUNT(*) AS medication_count FROM healthcare.medications GROUP BY generic_... |
You are an expert in writing database language. You can write a corresponding 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": "Can you show me the count of players from each country who have unlocked at least one achievement developed by studios based in France?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.country_code, COUNT(DISTINCT p.player_id) AS player_count\nFROM g... |
You are an expert in writing database language. You can write a corresponding 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": "Which locations have received fuel logs greater than 300 liters in total? Please include the location name and city.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT l.name AS location_name, l.city, SUM(f.quantity) AS total_quantity\nFROM transportatio... |
You are an expert in writing database language. You can write a corresponding 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 trading_platform.dapps (
dapp_id character varying(64) NOT NULL, -- unique iden... | [
{
"role": "user",
"content": "How many unique users have a KYC audit record with status 'pending'?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(DISTINCT user_id) AS pending_kyc_users\nFROM trading_platform.kyc_audit\nWHERE 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
CREATE TABLE hospitality_technology.staff (
staff_id character varying(64) NOT NULL, -- uniq... | [
{
"role": "user",
"content": "Which staff members have never been assigned a manager? List their full names and property IDs.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT staff_id, first_name, last_name, property_id\nFROM hospitality_technology.staff\nWHERE manager_id IS 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 character varying(64) NOT NULL,... | [
{
"role": "user",
"content": "Which room types have a base rate above 250 USD, and what are their maximum occupancies?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT room_type_id, type_name, base_rate, max_occupancy\nFROM hospitality_technology.room_types\nWHERE base_rate > 250;"... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.properties (
property_id character varying(64) NOT NULL, ... | [
{
"role": "user",
"content": "Get the property name, room type name, base rate, and star rating for all room types with a base_rate above 200 in properties located in the USA, sorted by base_rate in descending order.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.property_name,... |
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 operational status of the train car with car_id 'CAR123'?",
"sql": null
},
{
"role": "assistant",
"content": "I'm sorry, but I can't provide information on the current operational status of the train car with car_id 'CAR123'. The data in the ... |
You are an expert in writing database language. You can write a corresponding 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": "Can you show me the average session duration and total score for each server and game combination?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT server_id, game_id, AVG(duration_seconds) AS avg_duration, SUM(score) AS total_score FROM gaming_technol... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash varch... | [
{
"role": "user",
"content": "Show me wallet addresses that hold more than 1000 of any ERC20 token, along with the token symbol and amount.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT eb.wallet_address, tm.symbol, eb.amount FROM erc20_balances eb JOIN token_metas tm ON eb.cont... |
You are an expert in writing database language. You can write a corresponding 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": "Show the first name, last name, and email of customers who have filed a claim, along with the status and estimated loss of each claim.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.first_name, T1.last_name, T1.email, T2.status, T2.estimated_loss ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.achievements ( achievement_id.uuid, game_id.uuid, name.text, descr... | [
{
"role": "user",
"content": "Could you list each game_id along with the count of hidden achievements and the count of visible achievements?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT game_id,\n SUM(CASE WHEN hidden THEN 1 ELSE 0 END) AS hidden_count,\n SUM(CASE 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 gaming_technology.developers ( developer_id uuid, name text, country text, founded_y... | [
{
"role": "user",
"content": "I want to find pairs of developers that share the same website domain. For each pair, show both developer names and the domain.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d1.name AS developer1, d2.name AS developer2, d1.domain AS domain\nFROM (\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 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 transportation.locations ( location_id text PRIMARY KEY, name text, type text, addre... | [
{
"role": "user",
"content": "List all pairs of locations where both are located in the same timezone but are in different cities. Include both location IDs, names, the timezone, and their respective cities.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT l1.location_id AS locatio... |
You are an expert in writing database language. You can write a corresponding 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, policy_id text, customer_id text, paym... | [
{
"role": "user",
"content": "What is the total amount paid and number of payments grouped by payment_method for payments between January 1, 2023 and December 31, 2023?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT payment_method,\n COUNT(*) AS payment_count,\n SUM(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 financial_services.customers ( customer_id text, first_name text, last_name text, da... | [
{
"role": "user",
"content": "Can you show me all pairs of customers living in the same city but with different last names? Show both customer IDs, both full names, and their city.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.customer_id AS customer_id_a, CONCAT(a.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
// Node Label: :Station
// Properties:
// station_id: String (Constraint: UNIQUE)
// station_... | [
{
"role": "user",
"content": "Can you help me find all staff members based at a specific station with station_id 'station_xyz', including the station details and platform information they are associated with?",
"sql": null
},
{
"role": "assistant",
"content": "MATCH (stf:Staff)-[:BASED_AT]->... |
You are an expert in writing database language. You can write a corresponding 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.blocks ( block_id text PRIMARY KEY, previous_block_id text, timestamp tim... | [
{
"role": "user",
"content": "List all users along with the number of smart contracts created by wallets they own.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.user_id, u.username, COUNT(sc.contract_id) AS contracts_created\nFROM blockchain.users u\nJOIN blockchain.wallets 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 gaming_technology.developers ( developer_id uuid, name text, country text, founded_y... | [
{
"role": "user",
"content": "Show me the names and websites of all developers whose website contains '.com'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT name, website FROM gaming_technology.developers WHERE website LIKE '%.com%';",
"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.servers (
server_id uuid NOT NULL DEFAULT gen_random_uuid(), -... | [
{
"role": "user",
"content": "I need to find pairs of servers that host the same game but are deployed in different regions. Can you write a SQL statement for that?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s1.game_id, s1.region AS region1, s2.region AS region2, s1.server_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 financial_services.customers ( customer_id character varying(64) NOT NULL, first_nam... | [
{
"role": "user",
"content": "List the first name, last name, and job title for all employees.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT first_name, last_name, job_title FROM financial_services.employees;",
"sql": null
},
{
"role": "user",
"content": "Only sh... |
You are an expert in writing database language. You can write a corresponding 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, token_name charac... | [
{
"role": "user",
"content": "What is the average market cap and average 24-hour trading volume for tokens on each chain?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT chain, AVG(market_cap) AS average_market_cap, AVG(volume_24h) AS average_volume_24h FROM token_dexpool_info GRO... |
You are an expert in writing database language. You can write a corresponding 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": "List all fuel log entries with their associated trip's route_number and the vehicle's license_plate where the total_cost exceeds 200, sorted by total_cost descending.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT fl.*, t.route_id, r.route_number, v.... |
You are an expert in writing database language. You can write a corresponding 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": "Please list the first name, last name, and date of birth for all female patients who were created in the year 2023.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT first_name, last_name, date_of_birth FROM healthcare.patients WHERE gender = 'Female' 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 salary or compensation package for a staff member with the role of Ticket Inspector?",
"sql": null
},
{
"role": "assistant",
"content": "I'm sorry, but I can't provide information about salary or compensation packages as this data is not included in ... |
You are an expert in writing database language. You can write a corresponding 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 the total number of invoices issued.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(*) FROM invoices;",
"sql": null
},
{
"role": "user",
"content": "How many invoices were issued in each status?",
"sql": null
},
... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.services ( service_id text, agency_id text, service_name text, d... | [
{
"role": "user",
"content": "List the names of employees and the agency they work for who have scheduled at least one appointment. Show the employee's first name, last name, and agency_id.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT e.first_name, e.last_name, e.agenc... |
You are an expert in writing database language. You can write a corresponding 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 of users who liked the post with ID 'P123'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT T1.username FROM social_media.users AS T1 JOIN social_media.likes AS T2 ON T1.user_id = T2.user_id WHERE T2.post_id = 'P123';",
... |
You are an expert in writing database language. You can write a corresponding 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": "List all pairs of lawyers who share the same last name but have different first names. Show the first name, last name, and lawyer ID for both lawyers in each pair.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT l1.first_name AS lawyer1_first_name, l1... |
You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, name character va... | [
{
"role": "user",
"content": "List all UTXO IDs, addresses, and amounts for unspent UTXOs with an amount between 200 and 800.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT utxo_id, address, amount FROM trading_platform.utxos WHERE spent = false AND amount BETWEEN 200 AND 800;",
... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.drivers ( driver_id.text, employee_id.text, first_name.text, last_nam... | [
{
"role": "user",
"content": "Calculate the total number of drivers for each status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT status,\n COUNT(*) AS driver_count\nFROM transportation.drivers\nGROUP 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 insurance.policies (
policy_id character varying(64) NOT NULL, -- unique identif... | [
{
"role": "user",
"content": "Show me a list of all policy numbers that have a deductible exactly equal to 0.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT policy_number\nFROM insurance.policies\nWHERE deductible = 0;",
"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": "For each reservation, show me the guest's full name, the property name, and the room type name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT r.reservation_id, g.first_name || ' ' || g.last_name AS guest_full_name, p.property_name, rt.type_name AS r... |
You are an expert in writing database language. You can write a corresponding 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.smart_contracts ( contract_id text, creator_address text, code text, time... | [
{
"role": "user",
"content": "Show me all smart contracts created by addresses that have created more than 3 contracts, along with the total number of contracts each creator has made.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT sc.contract_id, sc.creator_address, COUNT(*) OVER... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.loans (
loan_id character varying(64) NOT NULL, -- unique ide... | [
{
"role": "user",
"content": "I need a report that shows, for each account status and loan type, how many loans there are and the average principal amount.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.status,\n l.loan_type,\n COUNT(*) AS total_loans,\n AVG(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 social_media.users ( user_id character varying(64) NOT NULL, username character vary... | [
{
"role": "user",
"content": "List all users who commented on posts tagged with hashtag 'spring', showing user_id, comment_id, content, and tag_name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.user_id, c.comment_id, c.content, h.tag_name\nFROM social_media.comments c\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 transportation.routes ( route_id.text, route_number.text, description.text, origin_l... | [
{
"role": "user",
"content": "Which routes have their origin and destination in the same city? Show the route number, description, and the origin and destination location IDs.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT r.route_number, r.description, r.origin_location_id, r.de... |
You are an expert in writing database language. You can write a corresponding 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 all unique policies that have claim documents of type 'Claim Form'. For each, return the policy_number, start_date, end_date, and the document file_name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT p.policy_number, p.start_date, p.en... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.player_achievements ( player_achievement_id uuid NOT NULL DEFAULT ... | [
{
"role": "user",
"content": "Can you list for each player their most recent and second most recent achievements, showing columns player_id, recent_achievement_id, second_recent_achievement_id, and recent_unlocked_at?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT recent.player_i... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.customers ( customer_id text, first_name text, last_name text, date_of_bir... | [
{
"role": "user",
"content": "What is the total amount paid across all premium payments for payments marked as 'Failed'?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT sum(amount_paid) FROM insurance.premium_payments WHERE status = 'Failed';",
"sql": null
}
] |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.players ( player_id uuid NOT NULL DEFAULT gen_random_uuid(), usern... | [
{
"role": "user",
"content": "Show me all players who do not have a last_login recorded. List their player_id, username, and registration_date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT player_id, username, registration_date FROM gaming_technology.players WHERE last_login 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 government_services.services ( service_id text PRIMARY KEY, agency_id text, service_... | [
{
"role": "user",
"content": "List all services whose eligibility criteria mention 'citizen'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT service_id, service_name, eligibility_criteria FROM government_services.services WHERE eligibility_criteria ILIKE '%citizen%';",
"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 insurance.policies ( policy_id character varying(64) NOT NULL, customer_id character... | [
{
"role": "user",
"content": "For each customer, find pairs of policies where one policy’s premium is at least $5000 higher than the other. Show customer_id, lower_premium_policy_id, higher_premium_policy_id, and the premium_difference.",
"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 hospitality_technology.rooms ( room_id text, property_id text, room_number text, roo... | [
{
"role": "user",
"content": "Show me all rooms on floor 4 or above together with their room number, features, and current status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT room_id, room_number, features, status\nFROM hospitality_technology.rooms\nWHERE floor >= 4;",
"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 erc1155_approval_for_all ( block_number bigint, block_timestamp timestamp, transacti... | [
{
"role": "user",
"content": "For Avalanche tokens, show me the token `tick`, `creator`, and `max_supply` from the `token_info_avalanche` table.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT tick, creator, max_supply FROM token_info_avalanche",
"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.events ( event_id text, contract_id text, event_name text, data text, emitted_a... | [
{
"role": "user",
"content": "For each wallet, show the wallet address and the total value of tokens they have received across all token transfers.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT w.address, COALESCE(SUM(tt.value), 0) AS total_received_value\nFROM web3.wallets w\nL... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.accounts ( account_id character varying(64) NOT NULL, customer_id... | [
{
"role": "user",
"content": "Show me each account along with any loans linked to it. Include the account type, account balance, loan type, and loan principal amount.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.account_type, a.balance, l.loan_type, l.principal_amount FROM fi... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE trading_platform.orders ( order_id text PRIMARY KEY, user_id text, wallet_id text, a... | [
{
"role": "user",
"content": "List the top 5 largest unspent UTXOs by amount, showing utxo_id, address, and amount, ordered descending.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT utxo_id, address, amount FROM trading_platform.utxos WHERE spent = false ORDER BY amount DESC LIM... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.policies ( policy_id.text, customer_id.text, product_id.text, agent_id.tex... | [
{
"role": "user",
"content": "List all policies that expired in the last 30 days, along with their product IDs and premium amounts.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT policy_id, product_id, premium_amount FROM insurance.policies WHERE end_date BETWEEN DATE_SUB(CURRENT... |
You are an expert in writing database language. You can write a corresponding 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.users ( user_id character varying(64) NOT NULL, username character varyin... | [
{
"role": "user",
"content": "How many unique email domains are there among all registered users?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(DISTINCT SUBSTRING(email FROM '@(.*)$')) AS unique_domains FROM blockchain.users;",
"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
// Use Hashes for ticket details. Key format: ticket:<ticket_id>
// HSET ticket:tkt_1a2b ticket_i... | [
{
"role": "user",
"content": "特定のプラットフォームID 'plat_123' に関連するメンテナンス記録を取得するのを手伝っていただけますか?また、記録のステータスも含めてください。",
"sql": null
},
{
"role": "assistant",
"content": "SMEMBERS platform:plat_123:maintenance\nHGETALL maintenance_record:<record_id>",
"sql": null
},
{
"role": "user",
"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 healthcare.diagnoses (
diagnosis_id character varying(64) NOT NULL, -- unique id... | [
{
"role": "user",
"content": "Provide a count of diagnoses for each status, grouped by the code type.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT code_type, status, COUNT(*) FROM healthcare.diagnoses GROUP BY code_type, 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 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.customers ( customer_id text, first_name text, last_name text, date_of_bir... | [
{
"role": "user",
"content": "List policies issued by active agents to customers in the 'CA' state, including policy number, customer's first and last name, agent's first and last name, and the agent's license state.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.policy_number,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.