system
stringlengths
288
8.23k
conversations
listlengths
2
8
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE government_services.citizens ( citizen_id character varying(64) NOT NULL, national_id_number character varying(128) NOT...
[ { "role": "user", "content": "Count the number of registered citizens by gender." }, { "role": "assistant", "content": "SELECT\n gender,\n COUNT(*) AS citizen_count\nFROM government_services.citizens\nGROUP BY gender;" } ]
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE transportation.locations ( location_id character varying(64) NOT NULL, -- unique identifier for the location n...
[ { "role": "user", "content": "Which locations lack a postal code? For each, display the name, type, city, and state_province." }, { "role": "assistant", "content": "SELECT name, type, city, state_province\nFROM transportation.locations\nWHERE postal_code IS NULL;" }, { "role": "user", ...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE gaming_technology.in_game_items ( item_id uuid NOT NULL DEFAULT gen_random_uuid(), game_id uuid NOT NULL, item_name cha...
[ { "role": "user", "content": "Provide each game_id with the item_name of its cheapest item and its most expensive item." }, { "role": "assistant", "content": "SELECT min_items.game_id,\n min_items.item_name AS cheapest_item,\n max_items.item_name AS most_expensive_item\nFROM gaming_t...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE social_media.comments ( comment_id character varying(64) NOT NULL, -- unique identifier for the comment post_id...
[ { "role": "user", "content": "How many hashtags are there whose tag_name contains 'tech'?" }, { "role": "assistant", "content": "SELECT COUNT(*)\nFROM social_media.hashtags\nWHERE tag_name LIKE '%tech%';" } ]
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE government_services.citizens ( citizen_id character varying(64) NOT NULL, national_id_number character varying(128) NOT...
[ { "role": "user", "content": "For each agency offering more than 5 active services, list the agency_name, jurisdiction_level, and the count of active services. Order the results by the count in descending order." }, { "role": "assistant", "content": "SELECT a.agency_name,\n a.jurisdiction_...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE healthcare.medical_records ( record_id text PRIMARY KEY, patient_id text, appointment_id text, doctor_id text, record_d...
[ { "role": "user", "content": "Show me all medical records created before January 1, 2022." }, { "role": "assistant", "content": "SELECT * FROM healthcare.medical_records WHERE record_date < '2022-01-01';" } ]
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": "List the symbol and balance for all SUI coins, joining the `sui_coins` and `sui_coins_metadata` tables." }, { "role": "assistant", "content": "SELECT T2.symbol, T1.balance FROM sui_coins AS T1 INNER JOIN sui_coins_metadata AS T2 ON T1.object_id = T2.object_id" }, ...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE legal_services.lawyers ( lawyer_id.text, first_name.text, last_name.text, bar_number.text, firm_id.text, email.text, ph...
[ { "role": "user", "content": "List the first name, last name, and specialization of all lawyers who have uploaded at least one document." }, { "role": "assistant", "content": "SELECT T1.first_name, T1.last_name, T1.specialization FROM legal_services.lawyers AS T1 JOIN legal_services.documents AS...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE web3.wallets ( wallet_id.text, user_id.text, address.text, private_key.text, created_at.timestamp )
[ { "role": "user", "content": "How many wallets were created in each distinct month?" }, { "role": "assistant", "content": "SELECT DATE_TRUNC('month', created_at) AS creation_month, COUNT(*) AS wallet_count FROM web3.wallets GROUP BY DATE_TRUNC('month', created_at) ORDER BY creation_month;" }, ...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE trading_platform.dapps ( dapp_id character varying(64) NOT NULL, -- unique identifier for the DApp name charac...
[ { "role": "user", "content": "How many unique users have a KYC audit record with status 'pending'?" }, { "role": "assistant", "content": "SELECT COUNT(DISTINCT user_id) AS pending_kyc_users\nFROM trading_platform.kyc_audit\nWHERE status = 'pending';" } ]
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE financial_services.customers ( customer_id.text, first_name.text, last_name.text, date_of_birth.date, ssn_hash.text, ad...
[ { "role": "user", "content": "List all securities (security_id, ticker_symbol, security_name) that belong to the 'Technology' sector and have a currency of 'USD'." }, { "role": "assistant", "content": "SELECT security_id, ticker_symbol, security_name FROM financial_services.securities WHERE sect...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE legal_services.time_entries ( entry_id.text, case_id.text, lawyer_id.text, date_worked.date, hours_spent.numeric, billi...
[ { "role": "user", "content": "What is the total number of billable hours worked by each lawyer?" }, { "role": "assistant", "content": "SELECT lawyer_id,\n SUM(hours_spent) AS total_billable_hours\nFROM legal_services.time_entries\nWHERE is_billable = TRUE\nGROUP BY lawyer_id;" } ]
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE hospitality_technology.rooms ( room_id text, property_id text, room_number text, room_type_id text, floor integer, stat...
[ { "role": "user", "content": "List all staff members who have an access level greater than 3, showing their staff ID, first name, and last name." }, { "role": "assistant", "content": "SELECT staff_id, first_name, last_name FROM hospitality_technology.staff WHERE access_level > 3;" }, { "...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id text, license_plate text, vin text, make text, model text, year integer, type text...
[ { "role": "user", "content": "For all bookings, can you provide the booking ID, the passenger ID, and the make and model of the vehicle used for the associated trip?" }, { "role": "assistant", "content": "SELECT b.booking_id, b.passenger_id, v.make, v.model\nFROM transportation.bookings b\nJOIN ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.wallets ( wallet_id character varying(64) NOT NULL, user_id character varying(6...
[ { "role": "user", "content": "Find the user ID with the most wallets and list their user ID and the total number of wallets they have." }, { "role": "assistant", "content": "SELECT user_id, COUNT(wallet_id) AS wallet_count FROM web3.wallets GROUP BY user_id ORDER BY wallet_count DESC LIMIT 1;" ...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE hospitality_technology.reservations ( reservation_id.text, property_id.text, guest_id.text, room_id.text, room_type_id....
[ { "role": "user", "content": "List all pairs of overlapping reservations for the same room, including both reservation IDs, room ID, and each reservation's check-in and check-out dates." }, { "role": "assistant", "content": "SELECT r1.reservation_id AS reservation1_id,\n r2.reservation_id ...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE government_services.employees ( employee_id character varying(64) NOT NULL, -- unique identifier for the government...
[ { "role": "user", "content": "List the first name and last name of each employee, along with the first and last name of their manager." }, { "role": "assistant", "content": "SELECT e.first_name AS employee_first_name, e.last_name AS employee_last_name, m.first_name AS manager_first_name, m.last_...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE government_services.citizens ( citizen_id text, national_id_number text, first_name text, last_name text, date_of_birth...
[ { "role": "user", "content": "List the first and last name of every citizen and the city of the service location where they have had an appointment scheduled." }, { "role": "assistant", "content": "SELECT c.first_name, c.last_name, sl.city\nFROM government_services.appointments a\nINNER JOIN gov...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE healthcare.diagnoses ( diagnosis_id character varying(64) NOT NULL, -- unique identifier for the diagnosis entry ...
[ { "role": "user", "content": "Can you list all chronic diagnoses made in January 2024, showing diagnosis_id, diagnosis_code, and status, along with the doctor_id who made each diagnosis?" }, { "role": "assistant", "content": "SELECT diagnosis_id, diagnosis_code, status, doctor_id FROM healthcare...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id text, property_name text, address_line1 text, address_line2 text, city ...
[ { "role": "user", "content": "Show all rooms that are on floor 3." }, { "role": "assistant", "content": "SELECT room_id, property_id, room_number FROM hospitality_technology.rooms WHERE floor = 3;" }, { "role": "user", "content": "For these rooms, include the property name and room n...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE project_fundraising_record ( id.text, project_id.text, project_name.text, rounds_name.text, investment_value.numeric, i...
[ { "role": "user", "content": "What is the average investment value for projects that completed Series A funding rounds?" }, { "role": "assistant", "content": "SELECT AVG(investment_value) AS average_investment FROM project_fundraising_record WHERE rounds_name = 'Series A';" } ]
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE government_services.documents ( document_id character varying(64) NOT NULL, application_id character varying(64), citiz...
[ { "role": "user", "content": "List application IDs that have both documents and payments associated with them." }, { "role": "assistant", "content": "SELECT DISTINCT T1.application_id FROM documents AS T1 JOIN payments AS T2 ON T1.application_id = T2.application_id" }, { "role": "user", ...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id character varying(64) NOT NULL, -- unique identifier for the vehicle lice...
[ { "role": "user", "content": "Show all routes including their number, type, and description." }, { "role": "assistant", "content": "SELECT route_number , type , description FROM transportation.routes" }, { "role": "user", "content": "Only show routes of type 'City Bus'." }, { ...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE social_media.users ( user_id character varying(64) NOT NULL, username character varying(50) NOT NULL UNIQUE, email char...
[ { "role": "user", "content": "How many users have verified profiles?" }, { "role": "assistant", "content": "SELECT COUNT(*) FROM social_media.users WHERE is_verified = true;" } ]
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE smart_money_profit ( address character varying(100) NOT NULL, -- the user's address rank INT, -- the rank of the addres...
[ { "role": "user", "content": "Calculate the average realized_ratio across all addresses." }, { "role": "assistant", "content": "SELECT AVG(realized_ratio) AS average_realized_ratio\nFROM smart_money_profit;" } ]
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE hospitality_technology.reservations ( reservation_id text, property_id text, guest_id text, room_id text, room_type_id ...
[ { "role": "user", "content": "List reservations made by guests who have communication consent enabled, showing the reservation ID, guest full name, and property name." }, { "role": "assistant", "content": "SELECT T1.reservation_id, T2.first_name, T2.last_name, T3.property_name FROM hospitality_t...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE financial_services.loans ( loan_id text, account_id text, loan_type text, principal_amount numeric, current_principal_b...
[ { "role": "user", "content": "What is the average interest rate for auto loans (loan_type = 'Auto') with a principal amount between $20,000 and $50,000?" }, { "role": "assistant", "content": "SELECT AVG(interest_rate) AS avg_interest_rate FROM financial_services.loans WHERE loan_type = 'Auto' AN...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE legal_services.clients ( client_id text PRIMARY KEY, first_name text, last_name text, company_name text, email text UNI...
[ { "role": "user", "content": "Could you provide the firm_id, firm_name, total number of lawyers, and number of partners per firm?" }, { "role": "assistant", "content": "SELECT lf.firm_id,\n lf.firm_name,\n COUNT(lw.lawyer_id) AS total_lawyers,\n SUM(CASE WHEN lw.is_partner THEN...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE government_services.citizens ( citizen_id.text, national_id_number.text, first_name.text, last_name.text, date_of_birth...
[ { "role": "user", "content": "For each employee, show their first and last name and the number of documents they have verified." }, { "role": "assistant", "content": "SELECT e.first_name, e.last_name, COUNT(d.document_id) AS verified_documents_count\nFROM government_services.employees e\nJOIN go...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE gaming_technology.games ( game_id uuid NOT NULL DEFAULT gen_random_uuid(), -- unique identifier for the game ti...
[ { "role": "user", "content": "List all games and the servers hosting them, showing the game title, server name, region, and status." }, { "role": "assistant", "content": "SELECT g.title, s.server_name, s.region, s.status FROM gaming_technology.games g JOIN gaming_technology.servers s ON g.game_i...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE transportation.trips ( trip_id text PRIMARY KEY, route_id text, vehicle_id text, driver_id text, scheduled_departure ti...
[ { "role": "user", "content": "For each passenger, show their full name, email, and the number of unique trips they have participated in." }, { "role": "assistant", "content": "SELECT p.first_name, p.last_name, p.email, COUNT(DISTINCT b.trip_id) AS unique_trips\nFROM transportation.passengers p\n...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE blockchain.transactions ( transaction_id text, block_id text, sender_address text, receiver_address text, amount numeri...
[ { "role": "user", "content": "Show me the total transaction amount sent by each sender_address in the last 30 days, along with the count of transactions for each sender." }, { "role": "assistant", "content": "SELECT sender_address, SUM(amount) AS total_amount, COUNT(*) AS transaction_count FROM ...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birth date, gender text, address text, ...
[ { "role": "user", "content": "Count the number of patients whose address includes the word 'Street' and are male." }, { "role": "assistant", "content": "SELECT COUNT(*) FROM healthcare.patients WHERE address LIKE '%Street%' AND gender = 'Male';" } ]
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE token_metas ( block_timestamp.timestamp, block_number.bigint, transaction_hash.text, transaction_index.bigint, from_add...
[ { "role": "user", "content": "Which ERC20 tokens have a total supply between 1,000,000 and 5,000,000? List their symbol, name, and contract address." }, { "role": "assistant", "content": "SELECT symbol, name, contract_address FROM token_metas WHERE is_erc20 = 1 AND CAST(total_supply AS numeric) ...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE token_dexpool_info ( pair_address character varying(512) NOT NULL, token_name character varying(100) NOT NULL, token_sy...
[ { "role": "user", "content": "What is the average market cap and average 24-hour trading volume for tokens on each chain?" }, { "role": "assistant", "content": "SELECT chain, AVG(market_cap) AS average_market_cap, AVG(volume_24h) AS average_volume_24h FROM token_dexpool_info GROUP BY chain" },...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id.text, property_name.text, address_line1.text, address_line2.text, city....
[ { "role": "user", "content": "Show me all properties in California with a star rating above 4.0, along with their room types and base rates, ordered by star rating in descending order." }, { "role": "assistant", "content": "SELECT p.property_id, p.property_name, p.star_rating, rt.type_name, rt.b...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id character varying(64) NOT NULL, -- unique identifier for the prope...
[ { "role": "user", "content": "List all properties together with the floor numbers and room numbers of their rooms located in cities with a star rating greater than 4." }, { "role": "assistant", "content": "SELECT p.property_id, p.property_name, p.city, p.star_rating, r.floor, r.room_number\nFROM...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE insurance.customers ( customer_id text PRIMARY KEY, first_name text, last_name text, date_of_birth date, ssn_hash text,...
[ { "role": "user", "content": "For each state, count the number of customers and display state as state and the count as customer_count, ordered by customer_count descending." }, { "role": "assistant", "content": "SELECT state,\n COUNT(*) AS customer_count\nFROM insurance.customers\nGROUP B...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE social_media.comments ( comment_id text PRIMARY KEY, post_id text, user_id text, parent_comment_id text, content text, ...
[ { "role": "user", "content": "For each user, can you list the number of comments they made on posts containing the hashtag 'news'?" }, { "role": "assistant", "content": "SELECT c.user_id, COUNT(c.comment_id) AS comment_count\nFROM social_media.comments c\nJOIN social_media.post_hashtags ph ON c....
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE healthcare.patients ( patient_id character varying(64) NOT NULL, first_name character varying(100) NOT NULL, last_name ...
[ { "role": "user", "content": "Count the number of patients grouped by gender, showing gender and patient_count." }, { "role": "assistant", "content": "SELECT gender, COUNT(*) AS patient_count\nFROM healthcare.patients\nGROUP BY gender;" } ]
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE insurance.insurance_products ( product_id character varying(64) NOT NULL, -- unique identifier for the insurance pr...
[ { "role": "user", "content": "Find the total count of active insurance products." }, { "role": "assistant", "content": "SELECT COUNT(*) FROM insurance.insurance_products WHERE is_active = TRUE;" } ]
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE hospitality_technology.guests ( guest_id.text, first_name.text, last_name.text, email.text, phone_number.text, date_of_...
[ { "role": "user", "content": "Which guests have used services that are currently unavailable? Show guest full names, the service name, and the order status." }, { "role": "assistant", "content": "SELECT g.first_name, g.last_name, s.service_name, so.status\nFROM hospitality_technology.guests g\nJ...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE blockchain.users ( user_id character varying(64) NOT NULL, username character varying(128) NOT NULL, email character va...
[ { "role": "user", "content": "Show me all users who registered with a Gmail email address, along with their registration dates." }, { "role": "assistant", "content": "SELECT user_id, username, email, password_hash FROM blockchain.users WHERE email LIKE '%@gmail.com';" }, { "role": "user"...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE hospitality_technology.room_types ( room_type_id character varying(64) NOT NULL, property_id character varying(64) NOT ...
[ { "role": "user", "content": "Show me all room types with a base rate over $200 and max occupancy of at least 4, along with their property IDs and amenities." }, { "role": "assistant", "content": "SELECT room_type_id, property_id, type_name, base_rate, max_occupancy, amenities FROM hospitality_t...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE government_services.citizens ( citizen_id.text, national_id_number.text, first_name.text, last_name.text, date_of_birth...
[ { "role": "user", "content": "Show the job title, first name, and last name of all employees who were hired before 2010-01-01." }, { "role": "assistant", "content": "SELECT job_title, first_name, last_name\nFROM government_services.employees\nWHERE hire_date < '2010-01-01';" } ]
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE blockchain.addresses ( address_id text PRIMARY KEY, public_key text, balance numeric )
[ { "role": "user", "content": "Show me the top 5 addresses with the highest balances, along with their public keys." }, { "role": "assistant", "content": "SELECT address_id, public_key, balance FROM blockchain.addresses ORDER BY balance DESC LIMIT 5;" }, { "role": "user", "content": "...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE token_metas ( block_timestamp timestamp(6) NOT NULL, block_number bigint NOT NULL, transaction_hash varchar NOT NULL, t...
[ { "role": "user", "content": "List all NFT collections from the sui_nfts table where the owner is not null, including their name and collection_type." }, { "role": "assistant", "content": "SELECT name, collection_type FROM sui_nfts WHERE owner IS NOT NULL;" }, { "role": "user", "cont...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE social_media.users ( user_id text, username text, email text, password_hash text, full_name text, profile_picture_url t...
[ { "role": "user", "content": "How many users have disabled push notifications?" }, { "role": "assistant", "content": "SELECT COUNT(*) AS disabled_push_count\nFROM social_media.user_settings\nWHERE push_notifications_enabled = false;" } ]
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE government_services.citizens ( citizen_id character varying(64) NOT NULL, -- unique identifier for the citizen ...
[ { "role": "user", "content": "List the first name and last name of citizens who have scheduled appointments, along with the scheduled start time and purpose of their appointments." }, { "role": "assistant", "content": "SELECT T1.first_name, T1.last_name, T2.scheduled_start_time, T2.purpose FROM ...
You are an SQL statement expert. Given the table structure described by the CREATE TABLE statement, write an SQL query that provides the solution to the user's question. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id character varying(64) NOT NULL, -- unique identifier for the vehicle lice...
[ { "role": "user", "content": "List the license plate, make, and current status of all vehicles acquired after January 1, 2021." }, { "role": "assistant", "content": "SELECT license_plate, make, status \nFROM transportation.vehicles\nWHERE acquisition_date > '2021-01-01';" }, { "role": "u...