system stringlengths 315 17.3k | 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_metas ( block_timestamp.timestamp, block_number.bigint, transaction_hash.text,... | [
{
"content": "Which SUI coins are currently marked as 'exists' and have a balance over 500000 for any owner? Please show the coin_type, balance, and owner.",
"role": "user",
"sql": null
},
{
"content": "SELECT coin_type, balance, owner FROM sui_coins WHERE status = 'exists' AND CAST(balance AS b... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.passengers ( passenger_id text PRIMARY KEY, first_name text, last_nam... | [
{
"content": "List each passenger's first_name, last_name along with another passenger's first_name and last_name who share the same loyalty_program_id. Label them as member and peer.",
"role": "user",
"sql": null
},
{
"content": "SELECT p1.first_name AS member_first, p1.last_name AS member_last... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.users (
user_id character varying(64) NOT NULL, -- unique identifi... | [
{
"content": "List users who commented on posts and the content of the post they commented on. Show commenter username and post content.",
"role": "user",
"sql": null
},
{
"content": "SELECT T1.username, T2.content FROM social_media.users AS T1 JOIN social_media.comments AS T3 ON T1.user_id = T3... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.vehicles ( vehicle_id.text, license_plate.text, vin.text, make.text, ... | [
{
"content": "For each booking, show the booking_id, passenger's first name and last name, the trip_id, and the route_number associated with the trip.",
"role": "user",
"sql": null
},
{
"content": "SELECT b.booking_id, p.first_name, p.last_name, b.trip_id, r.route_number\nFROM transportation.boo... |
You are an expert in writing database language. You can write 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_... | [
{
"content": "能否帮我统计特定车站(station_id 为 'station_xyz')的所有工作人员数量?",
"role": "user",
"sql": null
},
{
"content": "MATCH (s:Station {station_id: 'station_xyz'})<-[:BASED_AT]-(staff:Staff)\nRETURN COUNT(staff) AS total_staff",
"role": "assistant",
"sql": null
}
] |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.player_achievements ( player_achievement_id uuid NOT NULL DEFAULT ... | [
{
"content": "Which achievement_id was unlocked the most times in the first quarter of 2024?",
"role": "user",
"sql": null
},
{
"content": "SELECT achievement_id, COUNT(*) as unlock_count FROM gaming_technology.player_achievements WHERE unlocked_at >= '2024-01-01 00:00:00+00' AND unlocked_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 hospitality_technology.properties ( property_id character varying(64) NOT NULL, prop... | [
{
"content": "List each property and the number of public reviews it has received.",
"role": "user",
"sql": null
},
{
"content": "SELECT p.property_id, p.property_name, COUNT(r.review_id) AS public_review_count\nFROM hospitality_technology.properties p\nLEFT JOIN hospitality_technology.reviews 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 insurance.customers ( customer_id text, first_name text, last_name text, date_of_bir... | [
{
"content": "I need a list of all documents associated with claims, showing the document ID, file name, document type, and the status of the claim it belongs to.",
"role": "user",
"sql": null
},
{
"content": "SELECT\n cd.document_id,\n cd.file_name,\n cd.document_type,\n c.status AS claim_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 government_services.citizens ( citizen_id text PRIMARY KEY, national_id_number text,... | [
{
"content": "List the appointment ID, the scheduled start time, and the name of the service location for all appointments scheduled between '2024-01-01' and '2024-12-31'.",
"role": "user",
"sql": null
},
{
"content": "SELECT T1.appointment_id, T1.scheduled_start_time, T2.location_name FROM gove... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.properties ( property_id text PRIMARY KEY, property_name text... | [
{
"content": "List each property with its manager's full name and the count of currently available services it offers.",
"role": "user",
"sql": null
},
{
"content": "SELECT p.property_id,\n p.property_name,\n CONCAT(m.first_name, ' ', m.last_name) AS manager_name,\n COUNT(s.ser... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.medications (
medication_id character varying(64) NOT NULL, -- unique... | [
{
"content": "List the medication_id, medication_name, and description for all medications whose generic_name starts with 'A'.",
"role": "user",
"sql": null
},
{
"content": "SELECT medication_id, medication_name, description\nFROM healthcare.medications\nWHERE generic_name LIKE 'A%';",
"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 narrative_info ( narrative.text, top_3_coins.text, price_change_percentage_1h.numeri... | [
{
"content": "List all narratives with a trend rank better than 50, showing the narrative name and their listed 'Top 3 Coins'.",
"role": "user",
"sql": null
},
{
"content": "SELECT narrative, top_3_coins FROM narrative_info WHERE trend_rank < 50",
"role": "assistant",
"sql": null
},
... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.cases ( case_id character varying(64) NOT NULL, case_number character... | [
{
"content": "Show me the document_id, document_name, and upload_timestamp for all documents uploaded by lawyer with ID 'lawyer_456'.",
"role": "user",
"sql": null
},
{
"content": "SELECT document_id, document_name, upload_timestamp\nFROM legal_services.documents\nWHERE uploaded_by_lawyer_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 social_media.posts ( post_id.text, user_id.text, content.text, media_url.text, media... | [
{
"content": "Show the count of unread notifications per user for notifications related to posts. Return recipient_user_id and unread_count.",
"role": "user",
"sql": null
},
{
"content": "SELECT recipient_user_id, COUNT(*) AS unread_count\nFROM social_media.notifications\nWHERE target_entity_typ... |
You are an expert in writing database language. You can write a corresponding 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,... | [
{
"content": "List the names of services available at service locations that are accessible and located in the state of 'California'.",
"role": "user",
"sql": null
},
{
"content": "SELECT T1.service_name, T2.location_name FROM government_services.services AS T1 JOIN government_services.service_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.posts ( post_id text, user_id text, content text, media_url text, media... | [
{
"content": "Count how many follow relationships were created in June 2024.",
"role": "user",
"sql": null
},
{
"content": "SELECT COUNT(follow_id) FROM social_media.follows WHERE created_at >= '2024-06-01' AND created_at < '2024-07-01';",
"role": "assistant",
"sql": null
}
] |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_metas ( block_timestamp timestamp(6) NOT NULL, block_number bigint NOT NULL, t... | [
{
"content": "List all ERC20 token symbols and their latest prices for tokens where the total supply is greater than '100000000000000000000'.",
"role": "user",
"sql": null
},
{
"content": "SELECT T1.symbol, T2.price FROM token_metas AS T1 JOIN token_prices_latest AS T2 ON T1.contract_address = 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.customers ( customer_id.text, first_name.text, last_name.text, da... | [
{
"content": "Which cities have more than 50 customers, and what is the average customer age in each?",
"role": "user",
"sql": null
},
{
"content": "SELECT city, COUNT(*) AS customer_count, AVG(EXTRACT(YEAR FROM AGE(CURRENT_DATE, date_of_birth))) AS avg_age\nFROM financial_services.customers\nGR... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.vehicles ( vehicle_id text PRIMARY KEY, license_plate text, vin text,... | [
{
"content": "Provide each trip's ID, vehicle license plate, driver's full name, origin city, and destination city.",
"role": "user",
"sql": null
},
{
"content": "SELECT t.trip_id,\n v.license_plate,\n CONCAT(d.first_name, ' ', d.last_name) AS driver_name,\n lo.city AS origin_c... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.transactions (
transaction_id character varying(64) NOT NULL,... | [
{
"content": "List employees whose transaction effective_date matches their hire_date anniversary. Show full name and count of such transactions.",
"role": "user",
"sql": null
},
{
"content": "SELECT e.employee_id,\n e.first_name || ' ' || e.last_name AS employee_name,\n COUNT(t.tran... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birt... | [
{
"content": "Show all prescriptions made in 2024 for medications prescribed during appointments scheduled at location 'LOC001', including prescription_id, patient_id, medication_id, and appointment_time.",
"role": "user",
"sql": null
},
{
"content": "SELECT pr.prescription_id, pr.patient_id, 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 government_services.services ( service_id text PRIMARY KEY, agency_id text, service_... | [
{
"content": "How many notifications related to services were sent for each service category in the past 7 days?",
"role": "user",
"sql": null
},
{
"content": "SELECT\n s.category,\n COUNT(n.notification_id) AS notification_count\nFROM\n government_services.notifications n\n JOIN government_... |
You are an expert in writing database language. You can write a corresponding 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... | [
{
"content": "List the policy ID, beneficiary first name, beneficiary last name, relationship, and the product name for all policy beneficiaries.",
"role": "user",
"sql": null
},
{
"content": "SELECT T1.policy_id, T1.first_name, T1.last_name, T1.relationship, T2.product_name FROM insurance.polic... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.properties ( property_id character varying(64) NOT NULL, prop... | [
{
"content": "List all staff members, showing their full name, position, and the name of the property where they work.",
"role": "user",
"sql": null
},
{
"content": "SELECT T1.first_name, T1.last_name, T1.position, T2.property_name FROM hospitality_technology.staff AS T1 JOIN hospitality_technol... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE project_fundraising_record ( id character varying(32) NOT NULL, project_id character... | [
{
"content": "Show me the top 5 projects by total investment value, along with their latest fundraising round name and valuation.",
"role": "user",
"sql": null
},
{
"content": "SELECT project_name, rounds_name, valuation, SUM(investment_value) AS total_investment_value FROM project_fundraising_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 transportation.drivers ( driver_id text PRIMARY KEY, employee_id text, first_name te... | [
{
"content": "Show me driver first_name, last_name, route_number and origin city for all trips scheduled to depart between current_date and current_date + interval '7 days'.",
"role": "user",
"sql": null
},
{
"content": "SELECT d.first_name,\n d.last_name,\n r.route_number,\n 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 gaming_technology.players ( player_id uuid, username text, email text, password_hash... | [
{
"content": "Retrieve the top 5 players by the number of distinct achievements unlocked. Show player_id and distinct_unlocks.",
"role": "user",
"sql": null
},
{
"content": "SELECT p.player_id, COUNT(DISTINCT pa.achievement_id) AS distinct_unlocks\nFROM gaming_technology.players p\nJOIN gaming_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 transportation.routes ( route_id text, route_number text, description text, origin_l... | [
{
"content": "Retrieve route_number, description, and distance_km for routes that have a distance greater than the average distance of all routes.",
"role": "user",
"sql": null
},
{
"content": "SELECT route_number, description, distance_km\nFROM transportation.routes\nWHERE distance_km > (\n SE... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.trips (
trip_id character varying(64) NOT NULL, -- unique identi... | [
{
"content": "Show me the count of trips by status for each vehicle, but only include vehicles that have had more than 5 trips total.",
"role": "user",
"sql": null
},
{
"content": "SELECT vehicle_id, status, COUNT(*) as trip_count FROM transportation.trips GROUP BY vehicle_id, status HAVING COUN... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.contracts ( contract_id character varying(64) NOT NULL, address character varyi... | [
{
"content": "List the contract ID, address, and deployer address for all contracts deployed on the 'mainnet' network.",
"role": "user",
"sql": null
},
{
"content": "SELECT contract_id, address, deployer_address FROM web3.contracts WHERE network_id = 'mainnet';",
"role": "assistant",
"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 hospitality_technology.properties ( property_id text PRIMARY KEY, property_name text... | [
{
"content": "Which properties offer services in the 'Business Center' department, and what are the names and prices of those services?",
"role": "user",
"sql": null
},
{
"content": "SELECT p.property_id, p.property_name, s.service_name, s.price\nFROM hospitality_technology.properties p\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 financial_services.accounts ( account_id.text, customer_id.text, account_number.text... | [
{
"content": "Find customers who have accounts in more than one currency. List their customer_id and the count of distinct currencies they hold accounts in.",
"role": "user",
"sql": null
},
{
"content": "SELECT customer_id, COUNT(DISTINCT currency) AS distinct_currency_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 social_media.hashtags ( hashtag_id character varying(64) NOT NULL, tag_name characte... | [
{
"content": "List all hashtags created in March 2024 along with their creation timestamps.",
"role": "user",
"sql": null
},
{
"content": "SELECT hashtag_id, tag_name, created_at\nFROM social_media.hashtags\nWHERE created_at BETWEEN '2024-03-01 00:00:00' AND '2024-03-31 23:59:59';",
"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 hospitality_technology.reviews ( review_id text PRIMARY KEY, property_id text, reser... | [
{
"content": "For each overall rating level (1-5), count how many reviews received that rating.",
"role": "user",
"sql": null
},
{
"content": "SELECT rating_overall, COUNT(*) FROM reviews GROUP BY rating_overall ORDER BY rating_overall;",
"role": "assistant",
"sql": null
},
{
"co... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.claims (
claim_id character varying(64) NOT NULL, -- unique identifier... | [
{
"content": "List each claim_handler_id along with the number of claims they've handled and the total settlement_amount they've paid out.",
"role": "user",
"sql": null
},
{
"content": "SELECT claim_handler_id,\n COUNT(*) AS total_claims,\n SUM(settlement_amount) AS total_settlement\... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.clients ( client_id text PRIMARY KEY, first_name text, last_name text... | [
{
"content": "Show the total number of documents uploaded for each lawyer. Display the lawyer's first and last name and the document count.",
"role": "user",
"sql": null
},
{
"content": "SELECT l.first_name, l.last_name, COUNT(d.document_id) AS document_count\nFROM legal_services.lawyers l\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 erc20_balances ( block_number.bigint, contract_address.text, wallet_address.text, am... | [
{
"content": "For each NFT collection deployed on Ethereum, count the number of distinct wallets that have ever held any token from that collection.",
"role": "user",
"sql": null
},
{
"content": "SELECT\n nc.contract_address,\n nc.name,\n COUNT(DISTINCT nh.wallet_address) AS holder_count\nFRO... |
You are an expert in writing database language. You can write a corresponding 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, -- unique id... | [
{
"content": "I want a list of DApp names and the asset symbols mentioned in their descriptions.",
"role": "user",
"sql": null
},
{
"content": "SELECT d.name AS dapp_name,\n a.symbol AS asset_symbol\nFROM trading_platform.dapps d\nJOIN trading_platform.assets a\n ON d.description ILIKE '%... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
// PUT /stations
{
"mappings": {
"properties": {
"station_id": { "type": "keyword" },... | [
{
"content": "Can you help me retrieve the details of all routes that start from a specific station with station_id 'ST001', including the destination station name and route status?",
"role": "user",
"sql": null
},
{
"content": "SELECT r.route_id, r.route_name, r.description, r.is_active, s.stat... |
You are an expert in writing database language. You can write a corresponding 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.wallets ( wallet_id character varying(64) NOT NULL, user_id character var... | [
{
"content": "Show each user_id along with the total number of wallets they own.",
"role": "user",
"sql": null
},
{
"content": "SELECT user_id, COUNT(*) AS wallet_count\nFROM blockchain.wallets\nGROUP BY user_id;",
"role": "assistant",
"sql": null
},
{
"content": "Only include us... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.citizens (
citizen_id character varying(64) NOT NULL, -- un... | [
{
"content": "List all citizens who registered in the last 90 days but haven't scheduled any appointments. Display their citizen_id, full name, and registration_date.",
"role": "user",
"sql": null
},
{
"content": "SELECT c.citizen_id,\n c.first_name || ' ' || c.last_name AS full_name,\n ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.reservations ( reservation_id.text, property_id.text, guest_i... | [
{
"content": "Show me each guest's reservation count and average stay length in days.",
"role": "user",
"sql": null
},
{
"content": "SELECT guest_id,\n COUNT(*) AS reservation_count,\n AVG(check_out_date - check_in_date) AS avg_stay_days\nFROM hospitality_technology.reservations\nGRO... |
You are an expert in writing database language. You can write a corresponding 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, -- unique identi... | [
{
"content": "Show each insurance plan name along with the number of doctors whose phone number matches the plan's contact_phone.",
"role": "user",
"sql": null
},
{
"content": "SELECT p.plan_name, COUNT(d.doctor_id) AS matching_doctors\nFROM healthcare.insurance_plans p\nLEFT JOIN healthcare.doc... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.drivers ( driver_id character varying(64) NOT NULL, employee_id chara... | [
{
"content": "How many routes start and end in the same city?",
"role": "user",
"sql": null
},
{
"content": "SELECT COUNT(*) AS same_city_routes\nFROM transportation.routes AS r\nJOIN transportation.locations AS o ON r.origin_location_id = o.location_id\nJOIN transportation.locations AS d ON r.d... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.patients (
patient_id character varying(64) NOT NULL, -- unique iden... | [
{
"content": "List each patient's first and last name along with their total number of appointments in 2024.",
"role": "user",
"sql": null
},
{
"content": "SELECT p.first_name, p.last_name, COUNT(a.appointment_id) AS appointment_count\nFROM healthcare.patients p\nLEFT JOIN healthcare.appointment... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.player_achievements ( player_achievement_id uuid, player_id uuid, ... | [
{
"content": "List all pairs of achievements unlocked by the same player, showing player_id, achievement1, and achievement2.",
"role": "user",
"sql": null
},
{
"content": "SELECT pa1.player_id,\n pa1.achievement_id AS achievement1,\n pa2.achievement_id AS achievement2\nFROM gaming_te... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.customers (
customer_id character varying(64) NOT NULL, -- unique ide... | [
{
"content": "Show me all claims along with the related customer's full name and the policy number for incidents that occurred in 2024.",
"role": "user",
"sql": null
},
{
"content": "SELECT c.claim_id, c.incident_date, c.description, cu.first_name || ' ' || cu.last_name AS customer_full_name, p.... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.players (
player_id uuid NOT NULL DEFAULT gen_random_uuid(), -... | [
{
"content": "Show me a list of all achievements with their name, point value, and the title of the game they are part of.",
"role": "user",
"sql": null
},
{
"content": "SELECT\n T1.name,\n T1.points,\n T2.title\nFROM gaming_technology.achievements AS T1\nJOIN gaming_technology.games AS T2\n ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.documents ( document_id.text, case_id.text, document_name.text, docum... | [
{
"content": "List the latest version of each document (identified by case_id and document_name), showing the version number and its upload_timestamp.",
"role": "user",
"sql": null
},
{
"content": "SELECT d.case_id,\n d.document_name,\n d.version AS latest_version,\n d.upload... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE project_fundraising_record ( id character varying(32) NOT NULL, -- fundraising reco... | [
{
"content": "List projects that have raised funds and also have an associated token, showing their name, fundraising amount, and current token price.",
"role": "user",
"sql": null
},
{
"content": "SELECT T1.project_name, T1.investment_value, T2.price FROM project_fundraising_record AS T1 INNER ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE project_fundraising_record ( id character varying(32) NOT NULL, project_id character... | [
{
"content": "Which projects had fundraising rounds named 'Series A' in 2022, and what are their token symbols and current token prices from DEX pools?",
"role": "user",
"sql": null
},
{
"content": "SELECT p.project_name, p.rounds_name, d.token_symbol, d.price\nFROM project_fundraising_record p\... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.players ( player_id uuid NOT NULL DEFAULT gen_random_uuid(), usern... | [
{
"content": "Calculate the total points from all achievements unlocked by each player. Show player_id and total points.",
"role": "user",
"sql": null
},
{
"content": "SELECT pa.player_id, SUM(a.points) AS total_points FROM gaming_technology.player_achievements AS pa JOIN gaming_technology.achie... |
You are an expert in writing database language. You can write a corresponding 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... | [
{
"content": "For each route, list the route number, description, and the combined total maintenance cost for all vehicles that have ever operated on that route.",
"role": "user",
"sql": null
},
{
"content": "WITH VehicleTotalMaintenance AS ( SELECT vehicle_id, SUM(cost) AS total_cost FROM trans... |
You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, -- uniq... | [
{
"content": "List all appointments and all diagnoses made by the *same doctor*. Show the appointment ID, doctor ID, appointment time, and diagnosis ID.",
"role": "user",
"sql": null
},
{
"content": "SELECT a.appointment_id, a.doctor_id, a.appointment_time, d.diagnosis_id FROM healthcare.appoint... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.properties ( property_id text PRIMARY KEY, property_name text... | [
{
"content": "List all staff members who are not managers, including their first name, last name, position, and the name of the property they work at.",
"role": "user",
"sql": null
},
{
"content": "SELECT T1.first_name, T1.last_name, T1.position, T2.property_name FROM hospitality_technology.staf... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.maintenance_logs ( log_id character varying(64) NOT NULL, vehicle_id ... | [
{
"content": "Show all maintenance logs where the 'next_service_due_date' is before the current date, including the log ID, service date, service type, and the overdue next service date.",
"role": "user",
"sql": null
},
{
"content": "SELECT log_id, service_date, service_type, next_service_due_da... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.patient_insurance ( patient_insurance_id character varying(64) NOT NULL, ... | [
{
"content": "How many insurance policies have no expiration_date specified?",
"role": "user",
"sql": null
},
{
"content": "SELECT COUNT(*)\nFROM healthcare.patient_insurance\nWHERE expiration_date IS NULL;",
"role": "assistant",
"sql": null
}
] |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.vehicles ( vehicle_id text PRIMARY KEY, license_plate text, vin text,... | [
{
"content": "Show the total fare collected from bookings, grouped by the state/province of the destination location of the trip, for bookings made in May 2024.",
"role": "user",
"sql": null
},
{
"content": "SELECT\n l.state_province,\n SUM(b.fare) AS total_fare_collected\nFROM transportation.... |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 12