Dataset Viewer
Auto-converted to Parquet Duplicate
system
stringlengths
3.56k
8.72k
conversations
listlengths
4
26
You are an expert in writing database language. You can write a corresponding 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, tr...
[ { "role": "user", "content": "For all NFT collections on the Ethereum blockchain, show me the collection name and the current floor price. Sort by floor price descending." }, { "role": "assistant", "content": "SELECT name, floor_price FROM nft_collections WHERE blockchain = 'Ethereum' ORDER BY C...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.medical_records ( record_id.text, patient_id.text, appointment_id.text, do...
[ { "role": "user", "content": "For each patient, find the date of their most recent medical record and the effective date of their current primary insurance plan. Return patient_id, last_record_date, and effective_date." }, { "role": "assistant", "content": "SELECT m.patient_id,\n m.last_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 token_metas ( block_timestamp.timestamp, block_number.bigint, transaction_hash.text, ...
[ { "role": "user", "content": "List all SUI coins with status 'exists' in both tables, showing owner, coin_type, symbol, name, and balance." }, { "role": "assistant", "content": "SELECT sc.owner,\n sc.coin_type,\n scm.symbol,\n scm.name,\n sc.balance\nFROM sui_coins sc\nJO...
You are an expert in writing database language. You can write a corresponding 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, produc...
[ { "role": "user", "content": "Which insurance products have 'comprehensive' in their coverage details? Show the product_id and product_name." }, { "role": "assistant", "content": "SELECT product_id, product_name FROM insurance.insurance_products WHERE coverage_details ILIKE '%comprehensive%';" ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.fuel_logs ( fuel_log_id character varying(64) NOT NULL, -- unique...
[ { "role": "user", "content": "List consecutive fueling events for each vehicle where the refill quantity increased compared to the previous event. Include vehicle_id, previous timestamp and quantity, current timestamp and quantity." }, { "role": "assistant", "content": "SELECT\n prev.vehicle_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 government_services.citizens ( citizen_id character varying(64) NOT NULL, -- uni...
[ { "role": "user", "content": "Which citizens have made the highest total payments in USD? Show their full name and total payment amount, ordered by total in descending order, limited to the top 3." }, { "role": "assistant", "content": "SELECT 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 project_fundraising_record ( id.text, project_id.text, project_name.text, rounds_name...
[ { "role": "user", "content": "Show all tokens on the Ethereum chain in token_dexpool_info that had a price increase in the last 6 hours, along with their 24h trading volume and smart money ROI." }, { "role": "assistant", "content": "SELECT td.token_symbol,\n td.price_change_percentage_6h,\...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE blockchain.smart_contracts ( contract_id text PRIMARY KEY, creator_address text, code...
[ { "role": "user", "content": "Show me the earliest created smart contract for each creator address." }, { "role": "assistant", "content": "SELECT DISTINCT ON (creator_address) contract_id, creator_address, code, timestamp FROM blockchain.smart_contracts ORDER BY creator_address, timestamp ASC;" ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.fuel_logs ( fuel_log_id character varying(64) NOT NULL, -- unique...
[ { "role": "user", "content": "For each fueling event, show its fuel_log_id, vehicle_id, log_timestamp, and the previous fueling event's fuel_log_id, log_timestamp, and quantity for the same vehicle." }, { "role": "assistant", "content": "SELECT fl.fuel_log_id,\n fl.vehicle_id,\n fl.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 healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birth...
[ { "role": "user", "content": "List each chronic active diagnosis along with the prescribed medication details, showing diagnosis_id, diagnosis_code, medication_id, dosage, and diagnosis_date." }, { "role": "assistant", "content": "SELECT d.diagnosis_id, d.diagnosis_code, p.medication_id, p.dosag...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.policies ( policy_id character varying(64) NOT NULL, customer_id character ...
[ { "role": "user", "content": "List all replacement policies where a customer received a new policy starting the day after their previous policy was cancelled. Return customer_id, original_policy_id, original_cancellation_date, new_policy_id, new_start_date." }, { "role": "assistant", "content": ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.customers ( customer_id text PRIMARY KEY, first_name text, last_name text, ...
[ { "role": "user", "content": "List each insurance product's name and type, along with the number of active policies and the total premium_amount collected for those policies. Only include products that have at least one active policy." }, { "role": "assistant", "content": "SELECT p.product_name,...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.users ( user_id text, username text, email text, password_hash text, ful...
[ { "role": "user", "content": "List the users who have never posted any public posts, showing user_id, username, and email." }, { "role": "assistant", "content": "SELECT u.user_id, u.username, u.email FROM social_media.users u LEFT JOIN social_media.posts p ON p.user_id = u.user_id AND p.visibili...
You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, ...
[ { "role": "user", "content": "Show all reviews made by guests along with the guest_id, guest's reservation_id, and the related property's property_id and review_date." }, { "role": "assistant", "content": "SELECT r.review_id, r.guest_id, r.reservation_id, r.property_id, r.review_date\nFROM hospi...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.rooms ( room_id.text, property_id.text, room_number.text, room...
[ { "role": "user", "content": "Show me all rooms along with their current overall review rating for each room, including the room number and property id." }, { "role": "assistant", "content": "SELECT r.room_number, r.property_id, AVG(rv.rating_overall) AS average_overall_rating\nFROM hospitality_...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.rooms ( room_id character varying(64) NOT NULL, property_id ch...
[ { "role": "user", "content": "Show me each staff member and the count of service orders they have delivered." }, { "role": "assistant", "content": "SELECT st.staff_id, st.first_name, st.last_name, COUNT(so.order_id) AS delivered_orders\nFROM hospitality_technology.staff st\nLEFT JOIN hospitality...
You are an expert in writing database language. You can write a corresponding 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": "Retrieve all active staff members who processed payments in USD within the last 30 days. Return staff first_name, last_name, property_name, and the count of payments processed." }, { "role": "assistant", "content": "SELECT s.first_name, s.last_name, p.property_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 gaming_technology.players ( player_id uuid NOT NULL DEFAULT gen_random_uuid(), --...
[ { "role": "user", "content": "Show me each player's last_login and the end_time of their most recent game session." }, { "role": "assistant", "content": "SELECT p.player_id,\n p.username,\n p.last_login,\n gs.last_end_time\nFROM gaming_technology.players p\nLEFT JOIN (\n SELEC...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE blockchain.smart_contracts ( contract_id.text, creator_address.text, code.text, times...
[ { "role": "user", "content": "Find all smart contracts where the contract code contains the keyword 'proxy'." }, { "role": "assistant", "content": "SELECT contract_id, creator_address, timestamp FROM blockchain.smart_contracts WHERE code LIKE '%proxy%';" }, { "role": "user", "content...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE token_metas ( block_timestamp timestamp(6) NOT NULL, block_number bigint NOT NULL, tr...
[ { "role": "user", "content": "For each ERC1155 contract in erc1155_approval_for_all, show contract_address, the count of approval-for-all events, and the number of unique current holders from nft_holders. Order by holder_count descending and limit to 5." }, { "role": "assistant", "content": "SEL...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.clients ( client_id character varying(64) NOT NULL, -- unique ide...
[ { "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." }, { "role": "assistant", "content": "SELECT lf.firm_name, c.first_name, c.last_name, a.s...
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
3