Dataset Viewer
Auto-converted to Parquet Duplicate
system
stringlengths
315
11.5k
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 varch...
[ { "role": "user", "content": "Show me the top 5 NFT collections with the highest token count, along with their names, symbols, and floor prices, but only include collections with a floor price greater than 0.5 ETH.", "sql": null }, { "role": "assistant", "content": "SELECT nc.name, nc.symbol...
You are an expert in writing database language. You can write a corresponding 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 property, list the names of all available services in the 'Wellness' category. Show property name and service name.", "sql": null }, { "role": "assistant", "content": "SELECT T1.property_name, T2.service_name FROM hospitality_technology.properties AS T1...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.agencies ( agency_id character varying(64) NOT NULL, agency_name...
[ { "role": "user", "content": "List the first and last names of employees and the number of services offered by their agency.", "sql": null }, { "role": "assistant", "content": "SELECT e.first_name, e.last_name, COUNT(s.service_id) AS service_count\nFROM government_services.employees e\nLEFT ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.doctors ( doctor_id character varying(64) NOT NULL, first_name character ...
[ { "role": "user", "content": "Show all diagnoses, including the diagnosis ID, description, diagnosis date, and the full name of the doctor who made the diagnosis.", "sql": null }, { "role": "assistant", "content": "SELECT T1.diagnosis_id, T1.description, T1.diagnosis_date, T2.first_name, T2....
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.citizens ( citizen_id.text, national_id_number.text, first_name....
[ { "role": "user", "content": "Show each employee's first and last name along with the number of appointments they have scheduled in March 2024.", "sql": null }, { "role": "assistant", "content": "SELECT e.first_name, e.last_name, COUNT(ap.appointment_id) AS appointment_count\nFROM 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 healthcare.appointments ( appointment_id text, patient_id text, doctor_id text, appo...
[ { "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.", "sql": null }, { "role": "assistant", "content": "SELECT patient_id, COUNT(diagnosis_id) 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 trading_platform.orders ( order_id.text, user_id.text, wallet_id.text, asset_id.text...
[ { "role": "user", "content": "Show each order with its previous order timestamp for the same user.", "sql": null }, { "role": "assistant", "content": "SELECT o.order_id, o.user_id, o.created_at AS current_time, MAX(prev.created_at) AS previous_time\nFROM trading_platform.orders o\nLEFT JOIN ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.agencies ( agency_id character varying(64) NOT NULL, agency_name...
[ { "role": "user", "content": "Retrieve the agency name and the most recent notification sent date for each agency, considering only notifications related to agencies.", "sql": null }, { "role": "assistant", "content": "SELECT a.agency_name, MAX(n.sent_at) AS last_notification_date\nFROM 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 legal_services.lawyers ( lawyer_id text PRIMARY KEY, first_name text, last_name text...
[ { "role": "user", "content": "I need the case_number and case_name along with the total billing amount (hours_spent * billing_rate) for cases that are currently open.", "sql": null }, { "role": "assistant", "content": "SELECT c.case_number, c.case_name, SUM(te.hours_spent * te.billing_rate) ...
You are an expert in writing database language. You can write a corresponding 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.tokens ( token_id character varying(64) NOT NULL, -- unique identifier for...
[ { "role": "user", "content": "List all tokens with a total supply greater than 1,000,000.", "sql": null }, { "role": "assistant", "content": "SELECT token_id, token_name, token_symbol, contract_address, total_supply\nFROM web3.tokens\nWHERE total_supply > 1000000;", "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 character varying(64) NOT NULL, license_plate c...
[ { "role": "user", "content": "List the name, city, and country of all locations where at least one vehicle is currently assigned (i.e., depot_id matches location_id).", "sql": null }, { "role": "assistant", "content": "SELECT l.name, l.city, l.country\nFROM transportation.locations l\nJOIN 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 web3.transactions ( transaction_id character varying(64) NOT NULL, from_address char...
[ { "role": "user", "content": "Find the top 5 transactions with the highest gas prices that were successful, including the from_address, to_address, and block_number.", "sql": null }, { "role": "assistant", "content": "SELECT from_address, to_address, block_number, gas_price FROM web3.transac...
You are an expert in writing database language. You can write a corresponding 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 each user along with how many image-type posts they've made, showing user_id and image_post_count, sorted by the count descending.", "sql": null }, { "role": "assistant", "content": "SELECT user_id, COUNT(*) AS image_post_count\nFROM social_media.posts\nWHE...
You are an expert in writing database language. You can write a corresponding 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": "Find all token transfers where the value is greater than 5000, including the token_id and transaction details like from_address and gas_used, sorted by value in descending order.", "sql": null }, { "role": "assistant", "content": "SELECT tt.token_id, tt.value, 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 government_services.notifications ( notification_id text PRIMARY KEY, citizen_id tex...
[ { "role": "user", "content": "For each notification, list its notification_id, message_subject, and the message_subject of the notification it relates to (assuming related_entity_type = 'notification').", "sql": null }, { "role": "assistant", "content": "SELECT n.notification_id,\n n.m...
You are an expert in writing database language. You can write a corresponding 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": "List the names of all DApps whose description contains the word 'auction' along with the user IDs of anyone who has had a KYC audit.", "sql": null }, { "role": "assistant", "content": "SELECT d.name AS dapp_name, k.user_id\nFROM trading_platform.dapps d\nJOIN tr...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure Collection 'assembly_steps'. Document structure: { _id: <ObjectId (or step_id)>, step_id: String,...
[ { "role": "user", "content": "特定の組み立てラインに関連するすべての手順を取得したいです。ラインIDと手順名、手順番号、必要なスキルレベルを含めてください。", "sql": null }, { "role": "assistant", "content": "db.assembly_steps.find(\n { line_id: '<specific_line_id>' },\n { step_id: 1, line_id: 1, step_number: 1, step_name: 1, required_skill_level:...
You are an expert in writing database language. You can write a corresponding 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...
[ { "role": "user", "content": "Show each pair of passengers who share the same loyalty_program_id but have different registration times. Return p1.first_name AS earlier, p2.first_name AS later, and loyalty_program_id.", "sql": null }, { "role": "assistant", "content": "SELECT p1.first_name 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 government_services.citizens ( citizen_id character varying(64) NOT NULL, -- un...
[ { "role": "user", "content": "How many citizens registered in each year?", "sql": null }, { "role": "assistant", "content": "SELECT DATE_PART('year', registration_date) AS year,\n COUNT(*) AS registration_count\nFROM government_services.citizens\nGROUP BY DATE_PART('year', registration...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.services ( service_id character varying(64) NOT NULL, propert...
[ { "role": "user", "content": "Show me each department in each property, along with the total number of available services and their combined price.", "sql": null }, { "role": "assistant", "content": "SELECT property_id, department, COUNT(*) AS service_count, SUM(price) AS total_price FROM 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.market_data ( data_point_id bigserial NOT NULL, -- auto-incre...
[ { "role": "user", "content": "For each security sector, what is the average volume recorded in the market data?", "sql": null }, { "role": "assistant", "content": "SELECT T2.sector, AVG(T1.volume) FROM financial_services.market_data AS T1 JOIN financial_services.securities AS T2 ON T1.securi...
You are an expert in writing database language. You can write a corresponding 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": "List the application IDs and statuses for applications assigned to employees in the 'Customer Service' department.", "sql": null }, { "role": "assistant", "content": "SELECT a.application_id, a.status\nFROM government_services.applications a\nJOIN government_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 legal_services.clients ( client_id character varying(64) NOT NULL, -- unique id...
[ { "role": "user", "content": "Which law firms have handled appointments with clients who registered in 2024? Please provide the law firm name, the client’s first and last name, and the appointment subject.", "sql": null }, { "role": "assistant", "content": "SELECT lf.firm_name, c.first_name,...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure Collection 'assembly_steps'. Document structure: { _id: <ObjectId (or step_id)>, step_id: String,...
[ { "role": "user", "content": "特定の職種の従業員情報を取得したいです。従業員ID、名前、職種、雇用日を表示してください。", "sql": null }, { "role": "assistant", "content": "db.employees.find(\n { job_title: '<specific_job_title>' },\n { employee_id: 1, first_name: 1, last_name: 1, job_title: 1, hire_date: 1, _id: 0 }\n).sort({ hi...
You are an expert in writing database language. You can write a corresponding 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": "Generate a report showing the total number of achievement unlocks broken down by the calendar day they occurred. Show the date and the total number of unlocks for that day.", "sql": null }, { "role": "assistant", "content": "SELECT DATE(unlocked_at) AS unlock_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 hospitality_technology.properties ( property_id character varying(64) NOT NULL, prop...
[ { "role": "user", "content": "List all staff members, showing their full name, position, and the name of the property where they work.", "sql": null }, { "role": "assistant", "content": "SELECT T1.first_name, T1.last_name, T1.position, T2.property_name FROM hospitality_technology.staff AS T1...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.cases ( case_id text, case_number text, case_name text, client_id tex...
[ { "role": "user", "content": "Find all cases that were closed in the year 2022, showing their case name, case number, and date closed.", "sql": null }, { "role": "assistant", "content": "SELECT case_name, case_number, date_closed FROM legal_services.cases WHERE date_closed >= '2022-01-01' AN...
You are an expert in writing database language. You can write a corresponding 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 ...
[ { "role": "user", "content": "List the log ID, vehicle ID, service date, and cost for all maintenance logs where the cost exceeds 2000 and the odometer reading is greater than 100,000.", "sql": null }, { "role": "assistant", "content": "SELECT log_id, vehicle_id, service_date, cost FROM 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 trading_platform.users ( user_id.text, username.text, email.text, password_hash.text...
[ { "role": "user", "content": "Show me the user ID and the total count of wallets associated with each user who owns at least one wallet.", "sql": null }, { "role": "assistant", "content": "SELECT T1.user_id, COUNT(T2.wallet_id) FROM trading_platform.users AS T1 JOIN trading_platform.wallets ...
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 ticket price for a journey on train number T4321?", "sql": null }, { "role": "assistant", "content": "I'm sorry, but I don't have access to information about ticket prices for specific trains. The data I have is limited to train details such as model...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birt...
[ { "role": "user", "content": "List patient_id, full name, policy_number, plan_type, and insurance_provider for all active primary insurance policies.", "sql": null }, { "role": "assistant", "content": "SELECT pi.patient_id,\n p.first_name,\n p.last_name,\n pi.policy_number,...
You are an expert in writing database language. You can write a corresponding 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": "How many visible achievements are there per game, and what is the average point value of these achievements?", "sql": null }, { "role": "assistant", "content": "SELECT game_id, COUNT(*) AS visible_count, AVG(points) AS avg_points\nFROM gaming_technology.achievem...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.medications ( medication_id character varying(64) NOT NULL, medication_na...
[ { "role": "user", "content": "Show the medication_id, medication_name, and manufacturer for all medication entries.", "sql": null }, { "role": "assistant", "content": "SELECT medication_id, medication_name, manufacturer FROM healthcare.medications;", "sql": null }, { "role": "use...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.policies ( policy_id text, customer_id text, product_id text, agent_id tex...
[ { "role": "user", "content": "List the product_id, product_name, and base_premium for all products that are currently inactive.", "sql": null }, { "role": "assistant", "content": "SELECT product_id, product_name, base_premium\nFROM insurance.insurance_products\nWHERE is_active = false;", ...
You are an expert in writing database language. You can write a corresponding 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": "Retrieve the average base premium of insurance products for each product_type, including only types that have more than 5 products.", "sql": null }, { "role": "assistant", "content": "SELECT product_type, AVG(base_premium) AS avg_premium\nFROM insurance.insuranc...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.insurance_products ( product_id text PRIMARY KEY, product_name text, produ...
[ { "role": "user", "content": "Show me product_id, product_name, and base_premium for products created after '2023-01-01'.", "sql": null }, { "role": "assistant", "content": "SELECT product_id,\n product_name,\n base_premium\nFROM insurance.insurance_products\nWHERE created_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 social_media.hashtags ( hashtag_id character varying(64) NOT NULL, tag_name characte...
[ { "role": "user", "content": "List all pairs of hashtags that were created on the same date. Show both tag names and the creation date.", "sql": null }, { "role": "assistant", "content": "SELECT a.tag_name AS tag1, b.tag_name AS tag2, a.created_at::date AS created_date\nFROM social_media.has...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.in_game_items ( item_id uuid NOT NULL DEFAULT gen_random_uuid(...
[ { "role": "user", "content": "For every game, can you provide the count of unique item types and the average item cost?", "sql": null }, { "role": "assistant", "content": "SELECT game_id, COUNT(DISTINCT item_type) AS num_unique_types, AVG(cost_amount) AS avg_item_cost FROM 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 CREATE TABLE hospitality_technology.reviews ( review_id.text, property_id.text, reservation_id.te...
[ { "role": "user", "content": "List public reviews whose comment contains the word 'slow'.", "sql": null }, { "role": "assistant", "content": "SELECT review_id, comment, review_date, rating_overall, property_id FROM hospitality_technology.reviews WHERE is_public = TRUE AND LOWER(comment) LIKE...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.agencies ( agency_id text, agency_name text, jurisdiction_level ...
[ { "role": "user", "content": "Can you show me a list of all agencies along with their parent agency names?", "sql": null }, { "role": "assistant", "content": "SELECT a.agency_id, a.agency_name, pa.agency_name AS parent_agency_name\nFROM government_services.agencies a\nLEFT JOIN government_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 gaming_technology.player_inventory ( inventory_id uuid NOT NULL DEFAULT gen_rand...
[ { "role": "user", "content": "Can you show the total quantity of all in-game items held by each player?", "sql": null }, { "role": "assistant", "content": "SELECT player_id, SUM(quantity) AS total_quantity\nFROM gaming_technology.player_inventory\nGROUP BY player_id;", "sql": null }, ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.users ( user_id.text, username.text, email.text, password_hash.text...
[ { "role": "user", "content": "List the names and URLs of all decentralized applications where the description includes the word 'exchange'.", "sql": null }, { "role": "assistant", "content": "SELECT d.name, d.url\nFROM trading_platform.dapps d\nWHERE d.description ILIKE '%exchange%';", "...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.payments ( payment_id text, reservation_id text, guest_id tex...
[ { "role": "user", "content": "For each payment, list its payment_id, guest_id, payment_timestamp, and the next payment_id and next payment_timestamp made by the same guest.", "sql": null }, { "role": "assistant", "content": "SELECT p.payment_id,\n p.guest_id,\n p.payment_timestam...
You are an expert in writing database language. You can write a corresponding 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": "For each driver status, find the earliest and latest hire date. Show status, earliest hire date, and latest hire date.", "sql": null }, { "role": "assistant", "content": "SELECT\n status,\n MIN(hire_date) AS earliest_hire_date,\n MAX(hire_date) AS latest_hire...
You are an expert in writing database language. You can write a corresponding 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.trades ( trade_id text, order_id text, buyer_id text, seller_id tex...
[ { "role": "user", "content": "List all unspent UTXOs, including their utxo_id, address, amount, and transaction_id.", "sql": null }, { "role": "assistant", "content": "SELECT utxo_id, address, amount, transaction_id \nFROM trading_platform.utxos \nWHERE spent = false;", "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": "Retrieve all public posts that have geolocation coordinates specified, showing post_id, user_id, location_lat, location_lon, ordered by created_at descending.", "sql": null }, { "role": "assistant", "content": "SELECT post_id, user_id, location_lat, location_lon...
You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, created...
[ { "role": "user", "content": "For each group chat, list its ID, name, creation time, and the creation time of the next group chat created after it, ordered by creation time.", "sql": null }, { "role": "assistant", "content": "SELECT conversation_id, group_name, created_at, LEAD(created_at) O...
You are an expert in writing database language. You can write a corresponding 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 the policy number, start date, product name, and base premium for policies where the base premium of the associated product is greater than 1000.", "sql": null }, { "role": "assistant", "content": "SELECT T1.policy_number, T1.start_date, T2.product_name, 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 healthcare.patient_insurance ( patient_insurance_id.text, patient_id.text, plan_id.t...
[ { "role": "user", "content": "How many insurance policies does each subscriber have? Please display the subscriber name and policy count.", "sql": null }, { "role": "assistant", "content": "SELECT subscriber_name, COUNT(*) AS policy_count FROM healthcare.patient_insurance GROUP BY subscriber...
You are an expert in writing database language. You can write a corresponding 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...
[ { "role": "user", "content": "Show me the document_id, document_name, and upload_timestamp for all documents uploaded by lawyer with ID 'lawyer_456'.", "sql": null }, { "role": "assistant", "content": "SELECT document_id, document_name, upload_timestamp\nFROM legal_services.documents\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 financial_services.securities ( security_id text PRIMARY KEY, ticker_symbol text, is...
[ { "role": "user", "content": "List all securities issued by 'Morgan Stanley' along with their ticker_symbol, security_name, and exchange. Then also show the sector for each.", "sql": null }, { "role": "assistant", "content": "SELECT ticker_symbol, security_name, exchange, sector FROM financi...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id character varying(64) NOT NULL, ...
[ { "role": "user", "content": "Show me each property and the average rating_service from reviews posted in the last year.", "sql": null }, { "role": "assistant", "content": "SELECT p.property_name,\n AVG(rw.rating_service) AS avg_rating_service\nFROM hospitality_technology.properties 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 social_media.posts ( post_id text PRIMARY KEY, user_id text, content text, media_url...
[ { "role": "user", "content": "List all posts where the content mentions 'meeting'.", "sql": null }, { "role": "assistant", "content": "SELECT post_id, user_id, content, created_at FROM social_media.posts WHERE content LIKE '%meeting%'", "sql": null }, { "role": "user", "conte...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash text,...
[ { "role": "user", "content": "List all ERC20 tokens from the `token_metas` table that have a total supply greater than 1 followed by 21 zeros. Show their contract address, symbol, name, and total supply.", "sql": null }, { "role": "assistant", "content": "SELECT contract_address, symbol, nam...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.users ( user_id text, username text, email text, password_hash text, fu...
[ { "role": "user", "content": "Show me all users and the posts they have created, including the user's username and the post content.", "sql": null }, { "role": "assistant", "content": "SELECT u.username, p.post_id, p.content\nFROM social_media.users u\nJOIN social_media.posts p ON u.user_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 character varying(64) NOT NULL, -- unique identif...
[ { "role": "user", "content": "Show me all active policies with coverage limits above $1,000,000, along with the customer names and agent names, sorted by coverage limit in descending order.", "sql": null }, { "role": "assistant", "content": "SELECT p.policy_id, p.policy_number, p.coverage_li...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.servers ( server_id uuid NOT NULL DEFAULT gen_random_uuid(), game_...
[ { "role": "user", "content": "For each server, show it alongside another server in the same region that has the closest number of current players.", "sql": null }, { "role": "assistant", "content": "SELECT\n s1.server_id AS server_a_id,\n s1.server_name AS server_a_name,\n s2.server_id AS...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.medical_records ( record_id character varying(64) NOT NULL, patient_id ch...
[ { "role": "user", "content": "Show me the record_id, patient_id, prescription_id, medication_id, start_date, and the systolic blood pressure from the associated medical record for all prescriptions.", "sql": null }, { "role": "assistant", "content": "SELECT p.prescription_id,\n p.medic...
You are an expert in writing database language. You can write a corresponding 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_inventory ( inventory_id uuid, player_id uuid, item_id uuid...
[ { "role": "user", "content": "List each unique item ID and the total number of inventory entries for that item.", "sql": null }, { "role": "assistant", "content": "SELECT item_id, COUNT(*) AS entry_count FROM gaming_technology.player_inventory GROUP BY item_id;", "sql": null }, { ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.developers ( developer_id.uuid, name.text, country.text, founded_y...
[ { "role": "user", "content": "List all developer names and their websites.", "sql": null }, { "role": "assistant", "content": "SELECT name, website FROM gaming_technology.developers;", "sql": null }, { "role": "user", "content": "Can you only include developers whose website ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.notifications ( notification_id character varying(64) NOT NULL, ...
[ { "role": "user", "content": "List the application_id and the number of notifications with status 'Pending' for each application.", "sql": null }, { "role": "assistant", "content": "SELECT application_id, COUNT(*) AS pending_notification_count\nFROM government_services.notifications\nWHERE 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 gaming_technology.servers ( server_id.uuid, game_id.uuid, server_name.text, region.t...
[ { "role": "user", "content": "Show me all servers in the same region that have different statuses. I want to see the server names, regions, and their statuses for each pair.", "sql": null }, { "role": "assistant", "content": "SELECT s1.server_name AS server1, s2.server_name AS server2, s1.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 token_basic_info ( coin_id character varying(100) NOT NULL, token_name character var...
[ { "role": "user", "content": "Show the top 3 tokens on Polygon with the greatest positive price change over the last 6 hours, including their symbol, price, 6h change, and the number of smart money buy addresses in the last 24h.", "sql": null }, { "role": "assistant", "content": "SELECT tdi....
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.claim_documents ( document_id text, claim_id text, document_type text, fil...
[ { "role": "user", "content": "I want to find all claim IDs that have both an 'Accident Report' and a 'Police Report' document.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT a.claim_id\nFROM insurance.claim_documents a\nJOIN insurance.claim_documents b\n ON a.claim_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.premium_payments ( payment_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "Calculate the average and maximum payment amount grouped by payment status.", "sql": null }, { "role": "assistant", "content": "SELECT status,\n AVG(amount_paid) AS avg_amount,\n MAX(amount_paid) AS max_amount\nFROM insurance.premium_payments\nGROUP ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.doctors ( doctor_id text, first_name text, last_name text, specialty text...
[ { "role": "user", "content": "List the names and contact phone numbers of all insurance plans whose website is not null.", "sql": null }, { "role": "assistant", "content": "SELECT plan_name, contact_phone\nFROM healthcare.insurance_plans\nWHERE website IS NOT NULL;", "sql": null } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.premium_payments ( payment_id character varying(64) NOT NULL, policy_id ch...
[ { "role": "user", "content": "Show me all premium payments made by customer with ID 'CUST789'.", "sql": null }, { "role": "assistant", "content": "SELECT * FROM insurance.premium_payments WHERE customer_id = 'CUST789';", "sql": null }, { "role": "user", "content": "From those...
You are an expert in writing database language. You can write a corresponding 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": "Show the number of followers for each user who is following others, listing their user_id and follower count.", "sql": null }, { "role": "assistant", "content": "SELECT following_user_id AS user_id, COUNT(follower_user_id) AS follower_count\nFROM social_media.fo...
You are an expert in writing database language. You can write a corresponding 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 have created posts associated with any hashtag, and the name of the hashtag.", "sql": null }, { "role": "assistant", "content": "SELECT\n u.username,\n h.tag_name\nFROM social_media.users AS u\nJOIN social_media.posts AS p\n 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 healthcare.patients ( patient_id.text, first_name.text, last_name.text, date_of_birt...
[ { "role": "user", "content": "List all pairs of patients who registered on the same day. Show patient1_id, patient1_name, patient2_id, patient2_name, and the shared registration date.", "sql": null }, { "role": "assistant", "content": "SELECT p1.patient_id AS patient1_id, p1.first_name || ' ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.cases ( case_id.text, case_number.text, case_name.text, client_id.tex...
[ { "role": "user", "content": "Show me all time entries, including the case name they are associated with.", "sql": null }, { "role": "assistant", "content": "SELECT T1.*, T2.case_name FROM time_entries AS T1 JOIN cases AS T2 ON T1.case_id = T2.case_id", "sql": null }, { "role": "...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.law_firms ( firm_id text, firm_name text, address text, phone text, w...
[ { "role": "user", "content": "List all billable but unbilled time entries including entry_id, lawyer_id, case_id, date_worked, hours_spent, and billing_rate.", "sql": null }, { "role": "assistant", "content": "SELECT entry_id, lawyer_id, case_id, date_worked, hours_spent, billing_rate\nFROM ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id character varying(64) NOT NULL, license_plate c...
[ { "role": "user", "content": "Which vehicles have a total maintenance cost exceeding 10000 across all their maintenance logs?", "sql": null }, { "role": "assistant", "content": "SELECT vehicle_id, SUM(cost) AS total_maintenance_cost FROM transportation.maintenance_logs GROUP BY vehicle_id HA...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.patient_insurance ( patient_insurance_id character varying(64) NOT NU...
[ { "role": "user", "content": "Show me all patients who have non-primary insurance plans with expiration dates within the next 60 days, along with their policy numbers and subscriber names.", "sql": null }, { "role": "assistant", "content": "SELECT patient_id, policy_number, subscriber_name F...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id character varying(64) NOT NULL, -- unique ...
[ { "role": "user", "content": "For all maintenance records, can you show the vehicle's make, model, the odometer reading, and the mechanic's name?", "sql": null }, { "role": "assistant", "content": "SELECT v.make, v.model, m.odometer_reading, m.mechanic_name FROM transportation.maintenance_lo...
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
4