system stringlengths 298 8.08k | conversations listlengths 2 8 |
|---|---|
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE web3.tokens ( token_id text PRIMARY KEY, contract_address text, token_name text, token_symbol text, decimals int, total... | [
{
"role": "user",
"content": "List all pairs of tokens where the absolute difference in their decimals is exactly 2, showing both token_ids and their decimals."
},
{
"role": "assistant",
"content": "SELECT t1.token_id AS token_id1,\n t1.decimals AS decimals1,\n t2.token_id AS token_i... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE financial_services.trades ( trade_id.text, account_id.text, security_id.text, order_id.text, trade_type.text, quantity.... | [
{
"role": "user",
"content": "List all employees (employee_id, first_name, last_name) who have processed trades with a commission greater than $500."
},
{
"role": "assistant",
"content": "SELECT DISTINCT e.employee_id, e.first_name, e.last_name FROM financial_services.employees e JOIN financial_... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE nft_holder_historical ( block_number.bigint, contract_address.text, wallet_address.text, token_id.text, contract_type.t... | [
{
"role": "user",
"content": "Show me all NFT holders who own more than 10 of the same token, including the contract address, token ID, and wallet address."
},
{
"role": "assistant",
"content": "SELECT nh.contract_address, nh.token_id, nh.wallet_address, CAST(nh.amount AS decimal) AS token_count... |
You are an SQL statement expert and you can refuse the user's question if the question is not related to the table structure. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE train_station_management.s... | [
{
"role": "user",
"content": "What is the maintenance schedule for the platforms at the station with ID 'ST234' for the next month?"
},
{
"role": "assistant",
"content": "I'm sorry, but I don't have access to the maintenance schedule for the platforms at any station. The data I have only include... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE hospitality_technology.properties ( property_id.text, property_name.text, address_line1.text, address_line2.text, city.... | [
{
"role": "user",
"content": "What is the average delivery time in hours for all delivered service orders?"
},
{
"role": "assistant",
"content": "SELECT AVG(EXTRACT(EPOCH FROM (so.delivery_timestamp - so.order_timestamp)) / 3600) AS avg_delivery_hours\nFROM hospitality_technology.service_orders ... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE transportation.maintenance_logs ( log_id character varying(64) NOT NULL, vehicle_id character varying(64) NOT NULL, ser... | [
{
"role": "user",
"content": "Find maintenance log pairs for the same vehicle where the odometer reading is significantly higher in the second log compared to the first. Show the vehicle ID, service date and odometer for both logs in the pair, for increases greater than 50,000."
},
{
"role": "assist... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE hospitality_technology.guests ( guest_id text PRIMARY KEY, first_name text, last_name text, email text, phone_number te... | [
{
"role": "user",
"content": "List each guest’s full name and the total number of service orders they have placed, ordered by order count descending."
},
{
"role": "assistant",
"content": "SELECT g.guest_id,\n g.first_name || ' ' || g.last_name AS full_name,\n COUNT(so.order_id) AS o... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE social_media.hashtags ( hashtag_id.text, tag_name.text, created_at.timestamp )
CREATE TABLE social_media.conversations ... | [
{
"role": "user",
"content": "List all group conversations that were created after January 1st, 2023, and for each, show the names of hashtags that were created within the same month as the conversation."
},
{
"role": "assistant",
"content": "SELECT c.conversation_id, c.group_name, c.created_at ... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE hospitality_technology.properties ( property_id character varying(64) NOT NULL, property_name character varying(255) NO... | [
{
"role": "user",
"content": "Get a count of available rooms per room type across all properties."
},
{
"role": "assistant",
"content": "SELECT T2.type_name, COUNT(T1.room_id) AS available_room_count FROM hospitality_technology.rooms AS T1 INNER JOIN hospitality_technology.room_types AS T2 ON T1... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE erc1155_approval_for_all ( block_number bigint NOT NULL, block_timestamp timestamp(3) NOT NULL, transaction_index integ... | [
{
"role": "user",
"content": "For wallet address '0xWalletA', list the ERC20 tokens held, showing contract address and amount."
},
{
"role": "assistant",
"content": "SELECT contract_address, amount FROM erc20_balances WHERE wallet_address = '0xWalletA';"
},
{
"role": "user",
"content... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash varchar, transaction_index bigint, from_... | [
{
"role": "user",
"content": "List all NFT collections where the floor price is greater than 0.5 ETH, including their names and contract addresses."
},
{
"role": "assistant",
"content": "SELECT name, contract_address FROM nft_collections WHERE CAST(floor_price AS decimal) > 0.5 AND floor_price_s... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE government_services.employees (
employee_id character varying(64) NOT NULL, -- unique identifier for the government... | [
{
"role": "user",
"content": "Find employees who were hired after their managers. Display the employee's full name, their hire date, the manager's full name, and the manager's hire date."
},
{
"role": "assistant",
"content": "SELECT e.first_name || ' ' || e.last_name AS employee_name, e.hire_dat... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE healthcare.doctors ( doctor_id text, first_name text, last_name text, specialty text, license_number text, phone_number... | [
{
"role": "user",
"content": "Show me all insurance plans where the website includes 'secure'."
},
{
"role": "assistant",
"content": "SELECT * FROM healthcare.insurance_plans WHERE website ILIKE '%secure%';"
}
] |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE gaming_technology.player_achievements ( player_achievement_id uuid NOT NULL DEFAULT gen_random_uuid(), player_id uuid N... | [
{
"role": "user",
"content": "For each player, show the timestamp of their first achievement unlock. Include player_id and the timestamp."
},
{
"role": "assistant",
"content": "SELECT player_id, MIN(unlocked_at) as first_unlock_at FROM gaming_technology.player_achievements GROUP BY player_id ORD... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE government_services.citizens ( citizen_id text PRIMARY KEY, national_id_number text, first_name text, last_name text, d... | [
{
"role": "user",
"content": "Show the full names and contact emails of all citizens who have made a payment for an application that is currently in 'Pending' status."
},
{
"role": "assistant",
"content": "SELECT DISTINCT c.first_name || ' ' || c.last_name AS full_name, c.contact_email\nFROM gov... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE healthcare.patients ( patient_id.text, first_name.text, last_name.text, date_of_birth.date, gender.text, address.text, ... | [
{
"role": "user",
"content": "Show me all patients who have scheduled appointments with cardiology doctors, along with their appointment times and reasons."
},
{
"role": "assistant",
"content": "SELECT p.patient_id, p.first_name, p.last_name, a.appointment_time, a.reason FROM healthcare.patients... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birth date, gender text, address text, ... | [
{
"role": "user",
"content": "I need to find patients who received prescriptions within 7 days after their latest appointment. Show patient_id, first and last name, appointment_time, prescription_date, and medication_name."
},
{
"role": "assistant",
"content": "WITH latest_appt AS (\n SELECT pa... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE healthcare.patients ( patient_id character varying(64) NOT NULL, first_name character varying(100) NOT NULL, last_name ... | [
{
"role": "user",
"content": "Find all medical records where the treatment plan includes 'physical therapy' and the patient has an active primary insurance plan, showing the patient ID, record date, and insurance provider details."
},
{
"role": "assistant",
"content": "SELECT mr.patient_id, mr.r... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE insurance.claim_documents ( document_id text, claim_id text, document_type text, file_name text, file_path text, file_s... | [
{
"role": "user",
"content": "List all medical report documents with descriptions containing 'x-ray', showing their claim IDs and upload dates."
},
{
"role": "assistant",
"content": "SELECT claim_id, document_id, uploaded_at FROM insurance.claim_documents WHERE document_type = 'medical_report' A... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE hospitality_technology.room_types ( room_type_id character varying(64) NOT NULL, property_id character varying(64) NOT ... | [
{
"role": "user",
"content": "List all service orders for spa services with their guest names and total prices, ordered by total price in descending order."
},
{
"role": "assistant",
"content": "SELECT g.first_name, g.last_name, so.order_id, so.total_price FROM hospitality_technology.service_ord... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE healthcare.patients ( patient_id text PRIMARY KEY, first_name text, last_name text, date_of_birth date, gender text, ad... | [
{
"role": "user",
"content": "Show me all patients who have received at least two different medications prescribed by doctors working at the same hospital. Include the patient full name, the medication names, and the shared hospital_affiliation_id."
},
{
"role": "assistant",
"content": "SELECT D... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE legal_services.documents ( document_id text, case_id text, document_name text, document_type text, storage_path text, u... | [
{
"role": "user",
"content": "List the date worked, hours spent, and description for all time entries that have not yet been billed."
},
{
"role": "assistant",
"content": "SELECT date_worked , hours_spent , description FROM time_entries WHERE is_billed = false"
},
{
"role": "user",
... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE nft_holders ( block_number bigint NOT NULL, contract_address varchar NOT NULL, wallet_address varchar NOT NULL, token_i... | [
{
"role": "user",
"content": "Which NFTs minted in the past 14 days on Ethereum have a rarity_score above 70? For each, show contract address, token ID, name, and minter."
},
{
"role": "assistant",
"content": "SELECT contract_address, token_id, name, minter\nFROM nft_metadata\nWHERE blockchain =... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE hospitality_technology.properties ( property_id character varying(64) NOT NULL, property_name character varying(255) NO... | [
{
"role": "user",
"content": "Show me all reservations with more than 2 adults, along with their property names and room types."
},
{
"role": "assistant",
"content": "SELECT r.reservation_id, p.property_name, rt.room_type_name, r.check_in_date, r.check_out_date, r.num_adults FROM hospitality_tec... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE narrative_info ( narrative.text, top_3_coins.text, price_change_percentage_1h.numeric, price_change_percentage_24h.nume... | [
{
"role": "user",
"content": "For the 'AI' and 'Gaming' narratives, what is the total USD value held by CEXes for tokens listed in their top 3 coins?"
},
{
"role": "assistant",
"content": "SELECT T2.narrative, SUM(T1.usd_value) AS TotalCexUSDValue FROM cex_token_balance AS T1 JOIN narrative_info... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE financial_services.accounts ( account_id text PRIMARY KEY, customer_id text, account_number text, account_type text, ba... | [
{
"role": "user",
"content": "Show the number of employees in each department."
},
{
"role": "assistant",
"content": "SELECT department, COUNT(*) AS employee_count\nFROM financial_services.employees\ngroup BY department;"
},
{
"role": "user",
"content": "Exclude departments that have... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE healthcare.appointments ( appointment_id text, patient_id text, doctor_id text, appointment_time timestamp, duration_mi... | [
{
"role": "user",
"content": "For each patient, show the total number of diagnoses they have received, along with their patient ID and the ID of their latest diagnosis. Join with the diagnoses table."
},
{
"role": "assistant",
"content": "SELECT patient_id, COUNT(diagnosis_id) AS diagnosis_count... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE social_media.users (
user_id character varying(64) NOT NULL, -- unique identifier for the user
username charac... | [
{
"role": "user",
"content": "I need to get the most recent message each verified user has sent in any group chat, showing username, group_name, message_id, and sent_at."
},
{
"role": "assistant",
"content": "WITH user_recent AS (\n SELECT m.sender_user_id, m.message_id, m.conversation_id, m.se... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE nft_holder_historical ( block_number.bigint, contract_address.text, wallet_address.text, token_id.text, contract_type.t... | [
{
"role": "user",
"content": "List all ERC20 tokens with their names and symbols where the price is greater than $100, sorted by price in descending order."
},
{
"role": "assistant",
"content": "SELECT scm.name, scm.symbol, tpl.price FROM sui_coins_metadata scm JOIN token_prices_latest tpl ON sc... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE erc1155_approval_for_all (
block_number bigint NOT NULL, -- Block number containing the transaction
block_times... | [
{
"role": "user",
"content": "List all ERC20 tokens with their names and symbols where the price is greater than $10, sorted by price in descending order."
},
{
"role": "assistant",
"content": "SELECT t.symbol, t.name, p.price FROM sui_coins_metadata t JOIN token_prices_latest p ON t.coin_type =... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE healthcare.doctors ( doctor_id text, first_name text, last_name text, specialty text, license_number text, phone_number... | [
{
"role": "user",
"content": "List patients who have appointments scheduled, their appointment time, the name of their primary insurance plan, and the provider name."
},
{
"role": "assistant",
"content": "SELECT p.first_name AS patient_first_name, p.last_name AS patient_last_name, a.appointment_... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE transportation.vehicles ( vehicle_id text PRIMARY KEY, license_plate text, vin text, make text, model text, year int, t... | [
{
"role": "user",
"content": "For each route, list the route_number, origin city, destination city, and the total fare collected from completed bookings."
},
{
"role": "assistant",
"content": "SELECT\n r.route_number,\n lo.city AS origin_city,\n ld.city AS destination_city,\n ... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE erc1155_approval_for_all (
block_number bigint NOT NULL, -- Block number containing the transaction
block_times... | [
{
"role": "user",
"content": "Show me the top 5 NFT collections with the highest average rarity score, along with their contract addresses and names."
},
{
"role": "assistant",
"content": "SELECT contract_address, name, AVG(rarity_score) as avg_rarity_score FROM nft_metadata GROUP BY contract_ad... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE web3.wallets (
wallet_id character varying(64) NOT NULL, -- unique identifier for the wallet
user_id character... | [
{
"role": "user",
"content": "Show a list of all wallet addresses along with the user_id who owns them, sorted by the wallet creation time."
},
{
"role": "assistant",
"content": "SELECT user_id, address FROM web3.wallets ORDER BY created_at;"
}
] |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE hospitality_technology.staff ( staff_id text PRIMARY KEY, property_id text, first_name text, last_name text, position t... | [
{
"role": "user",
"content": "List all staff members who processed payments for guest ID 'G123', including their first name, last name, and the payment ID."
},
{
"role": "assistant",
"content": "SELECT T1.first_name, T1.last_name, T2.payment_id FROM staff AS T1 JOIN payments AS T2 ON T1.staff_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 token_metas ( block_timestamp timestamp(6) NOT NULL, block_number bigint NOT NULL, t... | [
{
"role": "user",
"content": "Show the wallet address and amount for the token with tick 'ordi', along with its maximum supply from the `token_info` table."
},
{
"role": "assistant",
"content": "SELECT T1.wallet_address, T1.amount, T2.max_supply FROM token_balances AS T1 JOIN token_info AS T2 ON... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE web3.events ( event_id character varying(64) NOT NULL, contract_id character varying(64) NOT NULL, event_name character... | [
{
"role": "user",
"content": "List all transactions along with the user ID and username of the sender, if available. Show transaction id, from_address, user id, and username."
},
{
"role": "assistant",
"content": "SELECT tx.transaction_id, tx.from_address, w.user_id, u.username\nFROM web3.transa... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE hospitality_technology.properties ( property_id character varying(64) NOT NULL, property_name character varying(255) NO... | [
{
"role": "user",
"content": "For each property, list the name of the room type and the number of rooms of that type at the property."
},
{
"role": "assistant",
"content": "SELECT T1.property_name, T2.type_name, count(T3.room_id) AS room_count FROM hospitality_technology.properties AS T1 JOIN ho... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE government_services.citizens ( citizen_id character varying(64) NOT NULL, national_id_number character varying(128) NOT... | [
{
"role": "user",
"content": "Show the total amount paid for services in each category."
},
{
"role": "assistant",
"content": "SELECT T2.category , SUM(T1.amount) FROM government_services.payments AS T1 JOIN government_services.services AS T2 ON T1.service_id = T2.service_id GROUP BY T2.categ... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE social_media.posts ( post_id.text, user_id.text, content.text, media_url.text, media_type.text, created_at.timestamp, u... | [
{
"role": "user",
"content": "List all group chat conversations and the number of messages in each group chat."
},
{
"role": "assistant",
"content": "SELECT c.conversation_id,\n c.group_name,\n COUNT(m.message_id) AS message_count\nFROM social_media.conversations c\nJOIN social_media... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE legal_services.clients (
client_id character varying(64) NOT NULL, -- unique identifier for the client
first_n... | [
{
"role": "user",
"content": "Show me all documents uploaded by lawyers from the 'Smith Legal Group' firm, including document_name, upload_timestamp, and the lawyer's first and last name."
},
{
"role": "assistant",
"content": "SELECT d.document_name, d.upload_timestamp, l.first_name, l.last_name... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE social_media.posts ( post_id.text, user_id.text, content.text, media_url.text, media_type.text, created_at.timestamp, u... | [
{
"role": "user",
"content": "Which users participated in conversations where the hashtag 'AI' was used in associated posts? I want both usernames and conversation IDs."
},
{
"role": "assistant",
"content": "SELECT cp.user_id, cp.conversation_id\nFROM social_media.conversation_participants cp\nJ... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE gaming_technology.developers (
developer_id uuid NOT NULL DEFAULT gen_random_uuid(), -- unique identifier for the d... | [
{
"role": "user",
"content": "List each in-game item along with the number of sessions played in the game it belongs to. Show item_id, item_name, and session_count."
},
{
"role": "assistant",
"content": "SELECT i.item_id, i.item_name, COUNT(s.session_id) AS session_count\nFROM gaming_technology.... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
Node Label ':AircraftModel'. Properties: { model_id: String (Constraint: UNIQUE), model_name: Str... | [
{
"role": "user",
"content": "Can you help me fetch the inventory details for components associated with a specific aircraft build, including the batch number, quantity, and warehouse location?"
},
{
"role": "assistant",
"content": "MATCH (ab:AircraftBuild {build_id: 'specific_build_id'})-[:IS_M... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE gaming_technology.players (
player_id uuid NOT NULL DEFAULT gen_random_uuid(), -- unique identifier for the player
... | [
{
"role": "user",
"content": "Show a list of all game developers with their name and founded year."
},
{
"role": "assistant",
"content": "SELECT\n name,\n founded_year\nFROM gaming_technology.developers;"
},
{
"role": "user",
"content": "Please filter the list to only include devel... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE gaming_technology.players (
player_id uuid NOT NULL DEFAULT gen_random_uuid(), -- unique identifier for the player
... | [
{
"role": "user",
"content": "Which games have the highest number of different in-game items of type 'Weapon'? Show the game title and the count."
},
{
"role": "assistant",
"content": "SELECT g.title AS game_title, COUNT(*) AS weapon_count\nFROM gaming_technology.in_game_items i\nJOIN gaming_tec... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE government_services.documents ( document_id character varying(64) NOT NULL, application_id character varying(64), citiz... | [
{
"role": "user",
"content": "For each employee who has verified more than one document, list their employee ID, the first document they verified, and the next document they verified, along with both verification timestamps."
},
{
"role": "assistant",
"content": "SELECT\n d1.verified_by_employe... |
You are an SQL statement expert and you can refuse the user's question if the question is not related to the table structure. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE train_station_management.m... | [
{
"role": "user",
"content": "What are the qualifications or training history of the staff member who performed the maintenance with record_id 'REC123'?"
},
{
"role": "assistant",
"content": "I'm sorry, but I can't provide information about the qualifications or training history of staff members... |
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question.
##Table Structure
CREATE TABLE web3.contracts ( contract_id character varying(64) NOT NULL, address character varying(128) NOT NULL, abi text NOT NULL... | [
{
"role": "user",
"content": "List each transaction along with its status and the names of any events that were emitted during that transaction."
},
{
"role": "assistant",
"content": "SELECT tr.transaction_id, tr.status, e.event_name\nFROM web3.transactions tr\nLEFT JOIN web3.events e ON tr.tran... |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 4