Dataset Viewer
Auto-converted to Parquet Duplicate
system
stringlengths
315
8.44k
conversations
listlengths
2
8
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.locations ( location_id character varying(64) NOT NULL, name characte...
[ { "role": "user", "content": "Show all locations in 'Texas' with their name, city, and type." }, { "role": "assistant", "content": "SELECT location_id, name, city, type\nFROM transportation.locations\nWHERE state_province = 'Texas';" }, { "role": "user", "content": "Actually, only in...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure "CREATE TABLE token_basic_info (", "coin_id character varying(100) NOT NULL, -- the id of th...
[ { "role": "user", "content": "Which is the token with the largest difference between its highest and lowest price in the last 24h on each chain, and what is the token's symbol and current price?" }, { "role": "assistant", "content": "SELECT chain, token_symbol, price, (highest_price_24h - lowest...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.citizens ( citizen_id character varying(64) NOT NULL, -- un...
[ { "role": "user", "content": "List the first name and last name of employees who were hired in the year 2023, along with the name of the agency they work for." }, { "role": "assistant", "content": "SELECT e.first_name, e.last_name, a.agency_name FROM government_services.employees AS e JOIN gover...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.rooms ( room_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "Show me the average base rate for each room type across all properties. Include the room type name and the calculated average rate." }, { "role": "assistant", "content": "SELECT type_name, AVG(base_rate) FROM hospitality_technology.room_types GROUP BY type_name;" ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.doctors ( doctor_id text PRIMARY KEY, first_name text, last_name text, sp...
[ { "role": "user", "content": "List scheduled appointments, including the patient's full name, the doctor's full name, and the appointment time." }, { "role": "assistant", "content": "SELECT p.first_name, p.last_name, d.first_name, d.last_name, a.appointment_time FROM healthcare.appointments AS 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 project_fundraising_record ( id.text, project_id.text, project_name.text, rounds_nam...
[ { "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 gaming_technology.player_achievements ( player_achievement_id.uuid, player_id.uuid, ...
[ { "role": "user", "content": "List each player's most recent achievement unlock, showing the player_id, achievement_id, and unlocked_at timestamp." }, { "role": "assistant", "content": "SELECT pa.player_id, pa.achievement_id, pa.unlocked_at FROM gaming_technology.player_achievements pa INNER JOI...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.patients ( patient_id text PRIMARY KEY, first_name text, last_name text, ...
[ { "role": "user", "content": "List appointment_id, appointment_time, patient\\u2019s full name, and doctor\\u2019s specialty for all appointments scheduled in the next 7 days." }, { "role": "assistant", "content": "SELECT a.appointment_id, a.appointment_time, p.first_name || ' ' || p.last_name 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 transportation.vehicles ( vehicle_id.text, license_plate.text, vin.text, make.text, ...
[ { "role": "user", "content": "Show the vehicle ID and the total number of fuel logs recorded for each vehicle." }, { "role": "assistant", "content": "SELECT vehicle_id , count(*) FROM transportation.fuel_logs GROUP BY vehicle_id" }, { "role": "user", "content": "Filter this list to 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 healthcare.patients ( patient_id text PRIMARY KEY, first_name text, last_name text, ...
[ { "role": "user", "content": "Show me a list of all doctors and the names of patients who have had an appointment with them, including doctor ID, doctor full name, patient full name, and appointment time." }, { "role": "assistant", "content": "SELECT d.doctor_id, d.first_name AS doctor_first_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 gaming_technology.game_sessions ( session_id uuid PRIMARY KEY, player_id uuid, game_...
[ { "role": "user", "content": "List for each game the server with the highest current player count and also show how many sessions that server has hosted. Include game_id, server_name, current_players, and session_count." }, { "role": "assistant", "content": "WITH session_counts AS ( SELECT 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 social_media.users ( user_id text, username text, email text, password_hash text, fu...
[ { "role": "user", "content": "List the usernames of users who liked the post with ID 'P123'." }, { "role": "assistant", "content": "SELECT DISTINCT T1.username FROM social_media.users AS T1 JOIN social_media.likes AS T2 ON T1.user_id = T2.user_id WHERE T2.post_id = 'P123';" }, { "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 government_services.documents ( document_id character varying(64) NOT NULL, -- u...
[ { "role": "user", "content": "Count the number of documents for each unique document type." }, { "role": "assistant", "content": "SELECT document_type, COUNT(*) AS document_count FROM government_services.documents GROUP BY document_type ORDER BY document_count DESC;" } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.policies ( policy_id text, customer_id text, product_id text, agent_id tex...
[ { "role": "user", "content": "List all unique policies that have claim documents of type 'Claim Form'. For each, return the policy_number, start_date, end_date, and the document file_name." }, { "role": "assistant", "content": "SELECT DISTINCT p.policy_number, p.start_date, p.end_date, cd.file_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 social_media.messages ( message_id character varying(64) NOT NULL, conversation_id c...
[ { "role": "user", "content": "How many messages include a media attachment?" }, { "role": "assistant", "content": "SELECT COUNT(*) FROM social_media.messages WHERE media_url IS NOT NULL AND TRIM(media_url) <> '';" } ]
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, national_i...
[ { "role": "user", "content": "For each upcoming appointment in the next 7 days, list the appointment_id, scheduled_start_time, full name of the citizen, and the name of the service." }, { "role": "assistant", "content": "SELECT a.appointment_id, a.scheduled_start_time, \n 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 CREATE TABLE healthcare.patients ( patient_id character varying(64) NOT NULL, first_name characte...
[ { "role": "user", "content": "List all doctors who have prescribed medications with frequency 'Once daily', along with their specialties and the count of such prescriptions per doctor." }, { "role": "assistant", "content": "SELECT d.first_name, d.last_name, d.specialty, COUNT(pr.prescription_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 hospitality_technology.reservations ( reservation_id text, property_id text, guest_i...
[ { "role": "user", "content": "For each guest, list reservation_id, guest_id, check_in_date, and the next reservation_id and its check_in_date." }, { "role": "assistant", "content": "SELECT r1.reservation_id,\n r1.guest_id,\n r1.check_in_date,\n r2.reservation_id AS next_reserva...
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.bookings ( booking_id.text, passenger_id.text, trip_id.text, seat_num...
[ { "role": "user", "content": "What are the average and maximum fare amounts for each booking status?" }, { "role": "assistant", "content": "SELECT status, AVG(fare) AS avg_fare, MAX(fare) AS max_fare\nFROM transportation.bookings\nGROUP BY status;" }, { "role": "user", "content": "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 legal_services.cases ( case_id.text, case_number.text, case_name.text, client_id.tex...
[ { "role": "user", "content": "List the case name, case number, and date opened for all cases with a status of 'Pending'." }, { "role": "assistant", "content": "SELECT case_name, case_number, date_opened FROM legal_services.cases WHERE status = 'Pending';" }, { "role": "user", "conten...
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 cex_token_balance (", "snapshot_time character varying(32) NOT NULL, -- the ...
[ { "role": "user", "content": "What is the total USD value of tokens held by CEX addresses on the 'Ethereum' chain for the most recent snapshot time?" }, { "role": "assistant", "content": "WITH latest_snapshot AS (\n SELECT max(snapshot_time) as max_time\n FROM cex_token_balance\n)\nSELECT sum(...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.routes ( route_id text, route_number text, description text, origin_l...
[ { "role": "user", "content": "Show a list of all routes including their route number, type, distance in km, and estimated duration in minutes." }, { "role": "assistant", "content": "SELECT\n route_number,\n type,\n distance_km,\n estimated_duration_minutes\nFROM transportation.routes;" }, ...
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 medical record ID and record date for all medical records that are linked to an appointment whose duration was longer than the average duration of all appointments." }, { "role": "assistant", "content": "SELECT T1.record_id, T1.record_date FROM healthcare.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 healthcare.patients ( patient_id text PRIMARY KEY, first_name text, last_name text, ...
[ { "role": "user", "content": "List the medication names which have never been prescribed to any patient." }, { "role": "assistant", "content": "SELECT m.medication_name\nFROM healthcare.medications m\nLEFT JOIN healthcare.prescriptions p ON m.medication_id = p.medication_id\nWHERE p.prescription...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.citizens ( citizen_id text PRIMARY KEY, national_id_number text,...
[ { "role": "user", "content": "List the full names of citizens who have made payments for services that are currently inactive. Also show the service name and payment amount." }, { "role": "assistant", "content": "SELECT c.first_name || ' ' || c.last_name AS full_name, s.service_name, p.amount\nF...
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...
[ { "role": "user", "content": "For each scheduled appointment, list the appointment_id, appointment_time, patient_id, and the name of the patient's primary insurance plan. Only include appointments that have not been cancelled." }, { "role": "assistant", "content": "SELECT a.appointment_id,\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.lawyers ( lawyer_id character varying(64) NOT NULL, -- unique id...
[ { "role": "user", "content": "Show each lawyer's first and last name along with the number of open cases they lead, ordered by the highest number of open cases first." }, { "role": "assistant", "content": "SELECT l.first_name, l.last_name, COUNT(c.case_id) AS open_case_count\nFROM legal_services...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.room_types ( room_type_id text, property_id text, type_name t...
[ { "role": "user", "content": "Show me all available services with a unit of 'Per Hour'." }, { "role": "assistant", "content": "SELECT service_name , description , price FROM hospitality_technology.services WHERE is_available = true AND unit = 'Per Hour'" }, { "role": "user", "c...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.developers ( developer_id uuid, name text, country text, founded_y...
[ { "role": "user", "content": "Could you list each developer along with the next developer founded after them in the same country? Return columns current_developer, next_developer, and years_difference." }, { "role": "assistant", "content": "SELECT d1.name AS current_developer,\n d2.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 transportation.drivers ( driver_id text, employee_id text, first_name text, last_nam...
[ { "role": "user", "content": "List all maintenance logs for vehicles that had 'Oil Change' service in the last 3 months, showing vehicle ID, service date, and cost." }, { "role": "assistant", "content": "SELECT vehicle_id, service_date, cost FROM transportation.maintenance_logs WHERE service_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 transportation.vehicles ( vehicle_id character varying(64) NOT NULL, license_plate c...
[ { "role": "user", "content": "List all trips including the name of the origin location and the name of the destination location." }, { "role": "assistant", "content": "SELECT t.trip_id, origin.name AS origin_location_name, destination.name AS destination_location_name FROM transportation.trips 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 insurance.policies ( policy_id character varying(64) NOT NULL, customer_id character...
[ { "role": "user", "content": "Show me claim IDs and the file names of any documents associated with claims filed before January 1, 2024." }, { "role": "assistant", "content": "SELECT cd.claim_id, cd.file_name\nFROM insurance.claims c\nJOIN insurance.claim_documents cd ON c.claim_id = cd.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 trading_platform.users ( user_id character varying(64) NOT NULL, username character ...
[ { "role": "user", "content": "List the username and the total number of notifications each user has received, and also count how many of those are still unread." }, { "role": "assistant", "content": "SELECT u.username,\n COUNT(n.notification_id) AS total_notifications,\n SUM(CASE WHE...
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, -- fundrai...
[ { "role": "user", "content": "List the top 5 tokens by 24 hour trading volume on DEX pools." }, { "role": "assistant", "content": "SELECT token_name, token_symbol, volume_24h \nFROM token_dexpool_info \nORDER BY volume_24h DESC LIMIT 5;" }, { "role": "user", "content": "Show only the...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.players ( player_id uuid NOT NULL DEFAULT gen_random_uuid(), usern...
[ { "role": "user", "content": "Show the usernames and registration dates of all players whose last_login is NULL." }, { "role": "assistant", "content": "SELECT username, registration_date FROM gaming_technology.players WHERE last_login IS NULL;" }, { "role": "user", "content": "Please...
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": "List the top 5 most used services across all properties. Show service_name and total quantity ordered, ordered by quantity descending." }, { "role": "assistant", "content": "SELECT s.service_name,\n SUM(o.quantity) AS total_quantity\nFROM hospitality_technolog...
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": "List the names of properties and the room number for every room at each property." }, { "role": "assistant", "content": "SELECT T1.property_name , T2.room_number FROM hospitality_technology.properties AS T1 JOIN hospitality_technology.rooms AS T2 ON T1.property_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 gaming_technology.games ( game_id uuid, title text, developer_id uuid, publisher_id ...
[ { "role": "user", "content": "I’d like to see how many achievements each player has unlocked and the date of their first unlock." }, { "role": "assistant", "content": "SELECT pa.player_id, COUNT(pa.achievement_id) AS achievement_count, MIN(pa.unlocked_at) AS first_unlocked\nFROM gaming_technolog...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id.text, license_plate.text, vin.text, make.text, ...
[ { "role": "user", "content": "Show me all maintenance logs for vehicles assigned to depots in 'Los Angeles'. For each log, list the log_id, vehicle_id, service_date, and depot name." }, { "role": "assistant", "content": "SELECT ml.log_id, ml.vehicle_id, ml.service_date, loc.name AS depot_name\nF...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.customers ( customer_id.text, first_name.text, last_name.text, date_of_bir...
[ { "role": "user", "content": "Show the total number of policies in each status." }, { "role": "assistant", "content": "SELECT status, COUNT(*) FROM insurance.policies GROUP BY status" } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.trips ( trip_id text PRIMARY KEY, route_id text, vehicle_id text, dri...
[ { "role": "user", "content": "Show all trips with their trip ID, route ID, the ID of their origin location, and the ID of their destination location, where the route ID starts with 'EX'." }, { "role": "assistant", "content": "SELECT trip_id, route_id, origin_location_id, destination_location_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 transportation.vehicles ( vehicle_id character varying(64) NOT NULL, -- unique ...
[ { "role": "user", "content": "Can you list the email addresses, full names, and loyalty program IDs of all passengers who joined in March 2024?" }, { "role": "assistant", "content": "SELECT email, first_name, last_name, loyalty_program_id FROM transportation.passengers WHERE DATE_TRUNC('month', ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.patients ( patient_id text PRIMARY KEY, first_name text, last_name text, ...
[ { "role": "user", "content": "Find all pairs of patients who share the same emergency_contact_name. Show patient IDs and the shared emergency contact name." }, { "role": "assistant", "content": "SELECT p1.patient_id AS patient1_id, p2.patient_id AS patient2_id, p1.emergency_contact_name\nFROM he...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE blockchain.blocks ( block_id character varying(64) NOT NULL, -- unique identifi...
[ { "role": "user", "content": "Retrieve the block ID, timestamp, current block's difficulty, and the difficulty of the *previous* block for all blocks where the current block's difficulty is strictly greater than the previous block's difficulty." }, { "role": "assistant", "content": "SELECT b1.bl...
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 service orders including the order ID, service ID, quantity, total price, status, and the full name of the staff member who placed the order." }, { "role": "assistant", "content": "SELECT T1.order_id, T1.service_id, T1.quantity, T1.total_price, T1.status, T2.fi...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.users ( user_id text, username text, email text, password_hash text, created_at...
[ { "role": "user", "content": "Find pairs of users who have different usernames but share the same username length. List both user IDs, usernames, and the shared username length." }, { "role": "assistant", "content": "SELECT u1.user_id, u1.username AS user1_username, u2.user_id, u2.username AS 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 gaming_technology.players ( player_id uuid NOT NULL DEFAULT gen_random_uuid(), -...
[ { "role": "user", "content": "For each player, list their username and the total number of unique servers they have played on, only including players who have played on two or more different servers. Also show the titles of all games they've played sessions on." }, { "role": "assistant", "conten...
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": "Show me all maintenance logs that do not have a next service due date recorded. List the log ID, vehicle ID, and service date." }, { "role": "assistant", "content": "SELECT log_id, vehicle_id, service_date FROM transportation.maintenance_logs WHERE next_service_due_...
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 train_station_management.train_cars ( car_id character varying(64) NOT NULL, -- ...
[ { "role": "user", "content": "I need to find all tickets for a specific route 'RT456' along with the car details and route information." }, { "role": "assistant", "content": "SELECT t.ticket_id, t.seat_number, t.price, tc.car_number, tc.car_type, r.route_name, r.description\nFROM train_station_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 healthcare.medical_records ( record_id text PRIMARY KEY, patient_id text, appointmen...
[ { "role": "user", "content": "Show me medical records that mention a medication from the 'medications' table by name in their treatment plan. List the record ID, record date, patient ID, and the name of the mentioned medication." }, { "role": "assistant", "content": "SELECT T1.record_id, T1.reco...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure // Use Hashes to store station details. Key format: station:<station_id> // Example: // HSET stat...
[ { "role": "user", "content": "能否帮我查询特定列车(train_id 为 'train_789')上的所有车辆信息,并关联到该列车所在的路线信息?" }, { "role": "assistant", "content": "SMEMBERS train:train_789:cars\nHGETALL car:<car_id> for each car_id in result\nHGETALL train:train_789\nSMEMBERS schedule:sched_1122:bookings\nHGETALL booking:<booking_...
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...
[ { "role": "user", "content": "List the names of properties and the number of services they offer in the 'Spa' department." }, { "role": "assistant", "content": "SELECT P.property_name, COUNT(S.service_id) AS spa_service_count FROM hospitality_technology.properties AS P JOIN hospitality_technolog...
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 are the safety ratings or crash statistics for the Boeing 787 Dreamliner?" }, { "role": "assistant", "content": "I'm sorry, but I don't have access to safety ratings or crash statistics for specific aircraft models like the Boeing 787 Dreamliner. My data is lim...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.users ( user_id text, username text, email text, password_hash text, fu...
[ { "role": "user", "content": "List all posts along with the user emails of the authors." }, { "role": "assistant", "content": "SELECT p.post_id, p.content, u.email\nFROM social_media.posts p\nJOIN social_media.users u ON p.user_id = 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 token_metas ( block_timestamp.timestamp, block_number.bigint, transaction_hash.text,...
[ { "role": "user", "content": "Which wallets hold at least 100 units of any ERC1155 NFT, and what is the token ID and contract address of the NFT for each such holding?" }, { "role": "assistant", "content": "SELECT wallet_address, contract_address, token_id, amount\nFROM nft_holders\nWHERE contra...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.users ( user_id character varying(64) NOT NULL, username character vary...
[ { "role": "user", "content": "I need a list of all group chat names with every username." }, { "role": "assistant", "content": "SELECT u.username, c.group_name\nFROM social_media.users u\nJOIN social_media.conversations c ON 1=1\nWHERE c.is_group_chat = true;" }, { "role": "user", "c...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.agents ( agent_id text, first_name text, last_name text, agency_name text,...
[ { "role": "user", "content": "Show me each payment_method and the number of premium payments made using that method, sorted by the count in descending order." }, { "role": "assistant", "content": "SELECT payment_method, COUNT(*) AS payment_count FROM insurance.premium_payments GROUP BY payment_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 financial_services.accounts ( account_id character varying(64) NOT NULL, -- uniq...
[ { "role": "user", "content": "Summarize the accounts table by account type and currency, showing the average balance for each combination." }, { "role": "assistant", "content": "SELECT account_type, currency, AVG(balance) AS average_balance, COUNT(account_id) AS account_count FROM financial_serv...
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_nam...
[ { "role": "user", "content": "For each fundraising round, can you list the total amount invested and the corresponding number of projects in that round, as well as the highest token market cap associated with any project of that round? Please show the round name, total investment, project count, and max tok...
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 top 5 users who have the highest total trade volume (quantity * price) as buyers, along with their email addresses and the number of distinct assets they traded." }, { "role": "assistant", "content": "SELECT u.user_id, u.email, COUNT(DISTINCT t.asset_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.services ( service_id text, agency_id text, service_name text, d...
[ { "role": "user", "content": "For each agency, how many services are currently inactive? Return the agency_id and the count of inactive services." }, { "role": "assistant", "content": "SELECT\n agency_id,\n COUNT(*) AS inactive_service_count\nFROM government_services.services\nWHERE is_active ...
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
2