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 insurance.claims ( claim_id text, policy_id text, customer_id text, incident_date ti...
[ { "role": "user", "content": "Find any two claims made by the same customer on the same day. Return customer_id, the two claim IDs, and the incident date.", "sql": null }, { "role": "assistant", "content": "SELECT c1.customer_id,\n c1.claim_id AS claim1_id,\n c2.claim_id AS claim...
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": "Count how many follow relationships were created in June 2024.", "sql": null }, { "role": "assistant", "content": "SELECT COUNT(follow_id) FROM social_media.follows WHERE created_at >= '2024-06-01' AND created_at < '2024-07-01';", "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 hospitality_technology.services ( service_id character varying(64) NOT NULL, -- ...
[ { "role": "user", "content": "Retrieve service_id, service_name, price, and unit for all services in the 'Wellness' category priced between 30 and 100.", "sql": null }, { "role": "assistant", "content": "SELECT service_id,\n service_name,\n price,\n unit\nFROM hospitality_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.insurance_products ( product_id text PRIMARY KEY, product_name text, produ...
[ { "role": "user", "content": "Show me all insurance products of type 'Health' or 'Dental'.", "sql": null }, { "role": "assistant", "content": "SELECT *\nFROM insurance.insurance_products\nWHERE product_type IN ('Health', 'Dental');", "sql": null }, { "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 transportation.vehicles ( vehicle_id text, license_plate text, vin text, make text, ...
[ { "role": "user", "content": "List the full name of each driver and the city of the depot where their assigned vehicle is located.", "sql": null }, { "role": "assistant", "content": "SELECT d.first_name, d.last_name, l.city\nFROM transportation.drivers d\nJOIN transportation.trips t ON d.dri...
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.invoices ( invoice_id character varying(64) NOT NULL, -- unique ...
[ { "role": "user", "content": "Show me all invoices, displaying their invoice number and the payment date, for invoices that have been fully paid.", "sql": null }, { "role": "assistant", "content": "SELECT invoice_number, payment_date FROM legal_services.invoices WHERE status = 'Paid';", ...
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": "List each driver's first and last name along with the make and model of the vehicles they have driven, as well as the trip ID.", "sql": null }, { "role": "assistant", "content": "SELECT d.first_name, d.last_name, v.make, v.model, t.trip_id\nFROM transportation.d...
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.diagnoses ( diagnosis_id character varying(64) NOT NULL, record_id charac...
[ { "role": "user", "content": "Provide every combination of medication name and insurance plan name.", "sql": null }, { "role": "assistant", "content": "SELECT m.medication_name, p.plan_name\nFROM healthcare.medications AS m\nCROSS JOIN healthcare.insurance_plans AS p;", "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 PRIMARY KEY, name text, country tex...
[ { "role": "user", "content": "List all players who have unlocked achievements related to items of rarity 'Epic'. Show the player_id, achievement_id, and the item_name associated with the achievement.", "sql": null }, { "role": "assistant", "content": "SELECT pa.player_id, pa.achievement_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.customers ( customer_id text, first_name text, last_name text, date_of_bir...
[ { "role": "user", "content": "List the product_id and product_name for insurance products that are not currently active.", "sql": null }, { "role": "assistant", "content": "SELECT product_id, product_name FROM insurance.insurance_products WHERE is_active = 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 PRIMARY KEY, username text, email text, password_h...
[ { "role": "user", "content": "List all group conversation names along with the number of different users who have sent a message in each group.", "sql": null }, { "role": "assistant", "content": "SELECT c.group_name, COUNT(DISTINCT m.sender_user_id) AS unique_senders\nFROM social_media.conve...
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, -- uniqu...
[ { "role": "user", "content": "List each vehicle that has both Diesel and Gasoline fueling events. Show vehicle_id, the fuel_log_id and log_timestamp for the Diesel event, and the fuel_log_id and log_timestamp for the Gasoline event.", "sql": null }, { "role": "assistant", "content": "SELECT ...
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": "List all tokens on the 'Ethereum' chain with DEX 24h volume over 1000000. Show token_symbol, price, and volume_24h.", "sql": null }, { "role": "assistant", "content": "SELECT token_symbol, price, volume_24h\nFROM token_dexpool_info\nWHERE chain = 'Ethereum' AND ...
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 Index 'component_inventory'. Mapping: { properties: { inventory_record_id: { type: 'keyword' }, c...
[ { "role": "user", "content": "在庫記録の中で、特定のバッチ番号に関連する情報を取得したいです。バッチ番号と在庫数量、倉庫の位置を表示してください。", "sql": null }, { "role": "assistant", "content": "SELECT batch_number, quantity, location_warehouse FROM component_inventory WHERE batch_number = 'specific_batch_number';", "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 hospitality_technology.properties ( property_id text, property_name text, address_li...
[ { "role": "user", "content": "List all service orders for spa services in the last month, including the guest ID and total price.", "sql": null }, { "role": "assistant", "content": "SELECT order_id, guest_id, total_price FROM hospitality_technology.service_orders WHERE service_id LIKE 'SPA%'...
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.comments ( comment_id.text, post_id.text, user_id.text, parent_comment_...
[ { "role": "user", "content": "Show me the conversation ID and creation time for all conversations that are not group chats and have a recorded last message time.", "sql": null }, { "role": "assistant", "content": "SELECT conversation_id, created_at FROM social_media.conversations WHERE is_gr...
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": "Find all pairs of developers who share the exact same founded_year but are from different countries. Show both developer names, their countries, and the founded_year.", "sql": null }, { "role": "assistant", "content": "SELECT d1.name AS developer1_name, d1.count...
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.customers ( customer_id character varying(64) NOT NULL, first_nam...
[ { "role": "user", "content": "Show the average close price and total volume for market data, grouped by source.", "sql": null }, { "role": "assistant", "content": "SELECT source, AVG(close_price), SUM(volume) FROM financial_services.market_data GROUP BY source;", "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.servers ( server_id.uuid, game_id.uuid, server_name.text, region.t...
[ { "role": "user", "content": "Show each region and the total number of current_players across all its servers.", "sql": null }, { "role": "assistant", "content": "SELECT region, SUM(current_players) AS total_current_players\nFROM gaming_technology.servers\nGROUP BY region;", "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 project_fundraising_record ( id.text, project_id.text, project_name.text, rounds_nam...
[ { "role": "user", "content": "List all fundraising rounds where the average investment amount exceeded $10M, and show how many projects participated in each round.", "sql": null }, { "role": "assistant", "content": "SELECT rounds_name, COUNT(DISTINCT project_id) AS project_count, AVG(investm...
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": "List all details for medications whose description contains the word 'pain'.", "sql": null }, { "role": "assistant", "content": "SELECT * FROM healthcare.medications WHERE description LIKE '%pain%';", "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 government_services.appointments ( appointment_id text, citizen_id text, employee_id...
[ { "role": "user", "content": "Find all appointments where the employee ID is not null and show the appointment ID, employee ID, and the scheduled start time.", "sql": null }, { "role": "assistant", "content": "SELECT appointment_id, employee_id, scheduled_start_time FROM government_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 healthcare.insurance_plans ( plan_id.text, plan_name.text, insurance_provider.text, ...
[ { "role": "user", "content": "List plan_id, plan_name, and contact_phone for all insurance plans whose website ends with '.org' and that have at least one other plan with the same contact_phone.", "sql": null }, { "role": "assistant", "content": "SELECT a.plan_id, a.plan_name, a.contact_phon...
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 character varying(64) NOT NULL, employee_id chara...
[ { "role": "user", "content": "List all drivers who have an email address but no contact number recorded in the system.", "sql": null }, { "role": "assistant", "content": "SELECT driver_id, first_name, last_name, email FROM transportation.drivers WHERE email IS NOT NULL AND contact_number IS ...
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 PRIMARY KEY, first_name text, last_name text, agenc...
[ { "role": "user", "content": "Show me all active agents who have handled claims with police reports, along with the count of such claims per agent.", "sql": null }, { "role": "assistant", "content": "SELECT a.agent_id, a.first_name, a.last_name, COUNT(cd.claim_id) AS police_report_claims_cou...
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": "Show all prescriptions along with the patient's full name and the medication name. Include prescription_id, prescription_date, patient first_name, patient last_name, and medication_name.", "sql": null }, { "role": "assistant", "content": "SELECT pr.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 social_media.users ( user_id character varying(64) NOT NULL, username character vary...
[ { "role": "user", "content": "Show me the usernames and email addresses of users who have commented on their own posts, and the content of such comments.", "sql": null }, { "role": "assistant", "content": "SELECT u.username, u.email, c.content AS comment_content\nFROM social_media.comments 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 train_station_management.platforms ( platform_id character varying(64) NOT NULL,...
[ { "role": "user", "content": "Can you help me find all staff members assigned to a specific station with station_id 'STATION_002', along with their roles and the platform details at that station?", "sql": null }, { "role": "assistant", "content": "SELECT s.staff_id, s.first_name, s.last_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 project_fundraising_record (", "id character varying(32) NOT NULL, -- fundrai...
[ { "role": "user", "content": "For each project, list the earliest and latest fundraising rounds they completed, along with the investment values for those rounds.", "sql": null }, { "role": "assistant", "content": "SELECT project_name, MIN(investment_date) AS earliest_round_date, MAX(investm...
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, ticker_symbol text, isin_code text...
[ { "role": "user", "content": "Count the number of securities and the number of distinct issuers for each sector.", "sql": null }, { "role": "assistant", "content": "SELECT sector, COUNT(*) AS securities_count, COUNT(DISTINCT issuer_name) AS distinct_issuer_count FROM financial_services.secur...
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, last name, and date of birth for all citizens born before January 1, 1995.", "sql": null }, { "role": "assistant", "content": "SELECT first_name, last_name, date_of_birth FROM government_services.citizens WHERE date_of_birth < '1995-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 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 insurance.claims ( claim_id.text, policy_id.text, customer_id.text, incident_date.ti...
[ { "role": "user", "content": "Retrieve customer_id for customers who have a denied claim and an approved claim on the same incident_date. Show customer_id, denied_claim_id, approved_claim_id, and incident_date.", "sql": null }, { "role": "assistant", "content": "SELECT c_denied.customer_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_basic_info ( coin_id character varying(100) NOT NULL, token_name character var...
[ { "role": "user", "content": "For each chain, show the sum of smart money USD buy value and the average buy price for the 'AI' narrative, along with the top token by DEX liquidity from token_dexpool_info.", "sql": null }, { "role": "assistant", "content": "WITH ai_inflow AS (\n SELECT chain...
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.documents ( document_id character varying(64) NOT NULL, case_id chara...
[ { "role": "user", "content": "I need to find all pairs of documents that were uploaded by the same lawyer within 7 days of each other.", "sql": null }, { "role": "assistant", "content": "SELECT a.uploaded_by_lawyer_id,\n a.document_id AS doc1_id,\n b.document_id AS doc2_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 healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birt...
[ { "role": "user", "content": "List the medication_id and medication_name for all medications with a generic name that starts with 'Amox'.", "sql": null }, { "role": "assistant", "content": "SELECT medication_id, medication_name\nFROM healthcare.medications\nWHERE generic_name ILIKE 'Amox%';"...
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 character varying(64) NOT NULL, user_id character varyi...
[ { "role": "user", "content": "Show me the post ID, content, and creation time for all posts made by user 'user789'.", "sql": null }, { "role": "assistant", "content": "SELECT post_id, content, created_at FROM social_media.posts WHERE user_id = 'user789';", "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 insurance.customers ( customer_id text PRIMARY KEY, first_name text, last_name text,...
[ { "role": "user", "content": "List all claims, showing the claim ID, incident date, and the associated policy number.", "sql": null }, { "role": "assistant", "content": "SELECT T1.claim_id, T1.incident_date, T2.policy_number FROM insurance.claims AS T1 JOIN insurance.policies AS T2 ON T1.pol...
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": "How many patients are there in each gender category?", "sql": null }, { "role": "assistant", "content": "SELECT gender, COUNT(*) AS patient_count\nFROM healthcare.patients\nGROUP BY gender;", "sql": null }, { "role": "user", "content": "Now only ...
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": "Give me the number of achievements unlocked each day, returning unlock_date and unlock_count.", "sql": null }, { "role": "assistant", "content": "SELECT date_trunc('day', unlocked_at)::date AS unlock_date,\n COUNT(*) AS unlock_count\nFROM gaming_technology...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.users ( user_id character varying(64) NOT NULL, username character ...
[ { "role": "user", "content": "List each user with the date of their most recent trade (as a buyer or seller). Include all users even if they have not traded.", "sql": null }, { "role": "assistant", "content": "SELECT u.user_id,\n u.username,\n MAX(t.traded_at) AS last_trade_date\...
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": "List the full names and contact email of agents whose agency name contains 'Insurance'.", "sql": null }, { "role": "assistant", "content": "SELECT first_name, last_name, contact_email FROM insurance.agents WHERE agency_name LIKE '%Insurance%'", "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.claims ( claim_id character varying(64) NOT NULL, -- unique identifier...
[ { "role": "user", "content": "What is the average estimated_loss for claims with status 'Filed' or 'Approved'?", "sql": null }, { "role": "assistant", "content": "SELECT AVG(estimated_loss) AS avg_estimated_loss\nFROM insurance.claims\nWHERE status IN ('Filed', 'Approved');", "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.bookings ( booking_id character varying(64) NOT NULL, passenger_id ch...
[ { "role": "user", "content": "List all booking IDs and their status for bookings that have a special request recorded.", "sql": null }, { "role": "assistant", "content": "SELECT booking_id, status\nFROM transportation.bookings\nWHERE special_requests 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 social_media.posts ( post_id character varying(64) NOT NULL, user_id character varyi...
[ { "role": "user", "content": "Show me the count of posts per media_type for public posts.", "sql": null }, { "role": "assistant", "content": "SELECT media_type, COUNT(*) AS post_count\nFROM social_media.posts\nWHERE visibility = 'public'\nGROUP BY media_type;", "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 healthcare.doctors ( doctor_id text PRIMARY KEY, first_name text, last_name text, sp...
[ { "role": "user", "content": "Count the number of medications provided by the manufacturer 'Novartis'.", "sql": null }, { "role": "assistant", "content": "SELECT count(*) FROM healthcare.medications WHERE manufacturer = 'Novartis'", "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 government_services.applications ( application_id text, citizen_id text, service_id ...
[ { "role": "user", "content": "Show all applications for citizen 'cit789' that were last updated in March 2024, including their reference_number, status, and last_updated_at.", "sql": null }, { "role": "assistant", "content": "SELECT reference_number, status, last_updated_at FROM government_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 healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birt...
[ { "role": "user", "content": "List the plan_id, plan_name, and plan_type for all insurance plans where the insurance_provider is 'Humana'.", "sql": null }, { "role": "assistant", "content": "SELECT\n plan_id,\n plan_name,\n plan_type\nFROM healthcare.insurance_plans\nWHERE\n insurance_pr...
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 me all doctors who have prescribed medications along with the count of prescriptions they've made, ordered by the count in descending order.", "sql": null }, { "role": "assistant", "content": "SELECT d.doctor_id, d.first_name, d.last_name, COUNT(p.prescript...
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, ticker_symbol.text, isin_code.text...
[ { "role": "user", "content": "Could you show me all securities traded on the LSE exchange using GBP currency?", "sql": null }, { "role": "assistant", "content": "SELECT security_id, ticker_symbol, security_name, issuer_name\nFROM financial_services.securities\nWHERE exchange = 'LSE' AND curr...
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, -- unique id...
[ { "role": "user", "content": "List all transactions where the recipient address is not specified (i.e., to_address is NULL), showing transaction_id, from_address, value, and block_number.", "sql": null }, { "role": "assistant", "content": "SELECT transaction_id, from_address, value, block_nu...
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": "For each property, show the property name and the count of staff members with the position 'Manager'.", "sql": null }, { "role": "assistant", "content": "SELECT\n p.property_name,\n COUNT(s.staff_id) AS manager_count\nFROM hospitality_technology.properties 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 financial_services.accounts ( account_id character varying(64) NOT NULL, -- uniq...
[ { "role": "user", "content": "Show me a summary listing each customer's full name and the number of accounts they have, broken down by account status.", "sql": null }, { "role": "assistant", "content": "SELECT\n c.first_name,\n c.last_name,\n a.status,\n COUNT(a.account_id) AS account_co...
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": "List the first name and last name of employees who have verified documents, along with the document type they verified and the verification status.", "sql": null }, { "role": "assistant", "content": "SELECT e.first_name, e.last_name, d.document_type, d.verificat...
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 nft_holders ( block_number.bigint, contract_address.text, wallet_address.text, token...
[ { "role": "user", "content": "List all coin types and symbols from the sui_coins_metadata table.", "sql": null }, { "role": "assistant", "content": "SELECT coin_type, symbol FROM sui_coins_metadata;", "sql": null }, { "role": "user", "content": "Only show coins with status 'e...
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 erc1155_approval_for_all ( block_number bigint NOT NULL, -- Block number contain...
[ { "role": "user", "content": "For each Sui NFT with status 'exists', show its object ID, collection type, and owner.", "sql": null }, { "role": "assistant", "content": "SELECT object_id, collection_type, owner FROM sui_nfts WHERE status = 'exists';", "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 legal_services.clients ( client_id character varying(64) NOT NULL, first_name charac...
[ { "role": "user", "content": "Show me a summary of all clients with the total number of invoices they've received and the sum of total_amount for those invoices.", "sql": null }, { "role": "assistant", "content": "SELECT cl.client_id,\n CONCAT(cl.first_name, ' ', cl.last_name) AS clien...
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": "Show the full name and contact phone number for all citizens who registered before 2020.", "sql": null }, { "role": "assistant", "content": "SELECT CONCAT(first_name, ' ', last_name) AS full_name, contact_phone\nFROM government_services.citizens\nWHERE registrat...
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 text, first_name text, last_name text, company_na...
[ { "role": "user", "content": "Retrieve all lawyers specializing in 'Corporate Law', including their first_name, last_name, email, and phone.", "sql": null }, { "role": "assistant", "content": "SELECT first_name, last_name, email, phone\nFROM legal_services.lawyers\nWHERE specialization = 'Co...
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, -- unique iden...
[ { "role": "user", "content": "Can you show me the full name, date of birth, and policy number for all patients who have insurance policies that will expire in the next 60 days, including the insurance plan ID?", "sql": null }, { "role": "assistant", "content": "SELECT p.first_name, p.last_na...
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": "I’d like to get the count of notifications each user received for their own posts in the last 30 days.", "sql": null }, { "role": "assistant", "content": "SELECT u.user_id, u.username, COUNT(n.notification_id) AS notification_count\nFROM social_media.notificatio...
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.customers ( customer_id text PRIMARY KEY, first_name text, last_n...
[ { "role": "user", "content": "List all securities that have at least one market data entry with a volume over 5,000,000. Include the security's ticker symbol, security name, and the exchange it trades on.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT T1.ticker_symbol, 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 healthcare.diagnoses ( diagnosis_id.text, record_id.text, patient_id.text, doctor_id...
[ { "role": "user", "content": "Show prescription_id, medication_name, and dosage for all prescriptions where the medication manufacturer is 'Pfizer'.", "sql": null }, { "role": "assistant", "content": "SELECT p.prescription_id, m.medication_name, p.dosage\nFROM healthcare.prescriptions p\nJOI...
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": "Retrieve all patient insurance entries that have an expiration date before January 1st, 2024. Display the policy number, expiration date, and subscriber name.", "sql": null }, { "role": "assistant", "content": "SELECT policy_number, expiration_date, subscriber_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 healthcare.diagnoses ( diagnosis_id character varying(64) NOT NULL, -- unique id...
[ { "role": "user", "content": "List all pairs of diagnoses that belong to the same medical record. Show record_id, diagnosis_id from the first entry as diag1_id, and diagnosis_id from the second entry as diag2_id.", "sql": null }, { "role": "assistant", "content": "SELECT d1.record_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 hospitality_technology.properties ( property_id character varying(64) NOT NULL, prop...
[ { "role": "user", "content": "List all service orders along with the quantity, unit price, and total price for each order. Filter for orders placed on or after the start of the year 2023.", "sql": null }, { "role": "assistant", "content": "SELECT order_id, quantity, unit_price, total_price 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 healthcare.medications ( medication_id.text, medication_name.text, generic_name.text...
[ { "role": "user", "content": "List all patients who have an active prescription for a medication manufactured by 'AstraZeneca', along with their policy number and the prescription ID.", "sql": null }, { "role": "assistant", "content": "SELECT p.patient_id, pi.policy_number, pr.prescription_i...
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.likes ( like_id character varying(64) NOT NULL, -- unique identifie...
[ { "role": "user", "content": "Can you show me the total number of likes given to comments in all group conversations, and for each group, include the group_name?", "sql": null }, { "role": "assistant", "content": "SELECT c.conversation_id, c.group_name, COUNT(l.like_id) AS likes_on_comments\...
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 beneficiaries with a percentage_share greater than 30%, showing beneficiary_id, first_name, last_name, relationship, percentage_share, and policy_id.", "sql": null }, { "role": "assistant", "content": "SELECT beneficiary_id,\n first_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 social_media.users ( user_id character varying(64) NOT NULL, username character vary...
[ { "role": "user", "content": "How many public posts has each verified user created since 2024-01-01? Please list their username and post_count.", "sql": null }, { "role": "assistant", "content": "SELECT u.username, COUNT(p.post_id) AS post_count FROM social_media.users u LEFT JOIN social_med...
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.text, conversation_id.text, sender_user_id.text, ...
[ { "role": "user", "content": "List all messages that haven’t triggered any notification; show message_id, sender_user_id, and sent_at.", "sql": null }, { "role": "assistant", "content": "SELECT m.message_id, m.sender_user_id, m.sent_at\nFROM social_media.messages AS m\nLEFT JOIN social_media...
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 users and the total value of transactions they have received, showing user_id, username, and total_received_value.", "sql": null }, { "role": "assistant", "content": "SELECT u.user_id,\n u.username,\n COALESCE(SUM(t.value), 0) AS total_recei...
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.post_hashtags ( post_hashtag_id.text, post_id.text, hashtag_id.text ) C...
[ { "role": "user", "content": "List all conversation participants along with post_hashtag details where the participant's user_id matches the hashtag_id.", "sql": null }, { "role": "assistant", "content": "SELECT cp.conversation_id, cp.user_id, ph.post_id, ph.hashtag_id\nFROM social_media.con...
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": "For each asset, show the total quantity ordered with order status 'completed'.", "sql": null }, { "role": "assistant", "content": "SELECT asset_id, SUM(quantity) AS total_completed_quantity FROM trading_platform.orders WHERE status = 'completed' GROUP BY asset_i...
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 the total premium amount paid by each customer, grouped by customer_id and payment_method.", "sql": null }, { "role": "assistant", "content": "SELECT customer_id, payment_method, SUM(amount_paid) AS total_paid\nFROM insurance.premium_payments\nGROUP 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 transportation.vehicles ( vehicle_id text PRIMARY KEY, license_plate text, vin text,...
[ { "role": "user", "content": "Retrieve the daily total fare collected for bookings with status 'Completed' in March 2024. Display the booking_date and total_fare.", "sql": null }, { "role": "assistant", "content": "SELECT\n DATE(booking_time) AS booking_date,\n SUM(fare) AS total_fare\nFRO...
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": "Can you list the number of citizens registered each month in 2024? Please show the month and the citizen count.", "sql": null }, { "role": "assistant", "content": "SELECT TO_CHAR(registration_date, 'YYYY-MM') AS registration_month, COUNT(*) AS citizen_count FROM...
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": "Find all pairs of drivers who were hired on the same date. For each pair, show the first_name and last_name of both drivers as driver1_first, driver1_last, driver2_first, driver2_last, and their shared hire_date.", "sql": null }, { "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 transportation.fuel_logs ( fuel_log_id character varying(64) NOT NULL, -- uniqu...
[ { "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.", "sql": null }, { "role": "assistant", "content": "SELECT\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 hospitality_technology.properties ( property_id character varying(64) NOT NULL, prop...
[ { "role": "user", "content": "Show me all active staff members who are managers (position contains 'Manager'), along with their hire dates and the count of staff they supervise, ordered by supervised staff count in descending order.", "sql": null }, { "role": "assistant", "content": "SELECT ...
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, -- unique ide...
[ { "role": "user", "content": "Which users have sent messages in multiple different conversations? Show the user ID and the count of unique conversations.", "sql": null }, { "role": "assistant", "content": "SELECT sender_user_id, COUNT(DISTINCT conversation_id) AS unique_conversation_count FR...
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": "Get me the total number of vehicles for each fuel_type.", "sql": null }, { "role": "assistant", "content": "SELECT fuel_type,\n COUNT(*) AS total_vehicles\nFROM transportation.vehicles\nGROUP BY fuel_type;", "sql": null }, { "role": "user", ...
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 PRIMARY KEY, first_name text, last_name text, agenc...
[ { "role": "user", "content": "Find all agents with their managers where the agent's commission rate is above 0.10.", "sql": null }, { "role": "assistant", "content": "SELECT a.agent_id,\n a.first_name || ' ' || a.last_name AS agent_name,\n m.agent_id AS manager_id,\n m.firs...
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.documents ( document_id.text, case_id.text, document_name.text, docum...
[ { "role": "user", "content": "List all documents of type 'Pleading' uploaded between '2023-01-01' and '2023-12-31', including their name, case ID, and upload timestamp.", "sql": null }, { "role": "assistant", "content": "SELECT document_name, case_id, upload_timestamp FROM legal_services.doc...
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, security_id chara...
[ { "role": "user", "content": "I need the average close_price per sector for the last month.", "sql": null }, { "role": "assistant", "content": "SELECT s.sector, AVG(m.close_price) AS avg_close_price\nFROM financial_services.market_data m\nJOIN financial_services.securities s ON m.security_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 social_media.likes ( like_id.text, user_id.text, post_id.text, comment_id.text, crea...
[ { "role": "user", "content": "List all likes made by user 'U100' on posts, including the like_id and the post_id.", "sql": null }, { "role": "assistant", "content": "SELECT like_id, post_id FROM social_media.likes WHERE user_id = 'U100' AND post_id 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 erc1155_approval_for_all ( block_number bigint NOT NULL, -- Block number contain...
[ { "role": "user", "content": "Show all SUI coins that are marked as 'exists' in both sui_coins and sui_coins_metadata, displaying their coin_type, symbol, name, and balance.", "sql": null }, { "role": "assistant", "content": "SELECT sc.coin_type, scm.symbol, scm.name, sc.balance FROM sui_coi...
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": "List the usernames and emails of all users who have received notifications of type 'follow', along with the sender's user ID and the notification timestamp.", "sql": null }, { "role": "assistant", "content": "SELECT u.username, u.email, n.sender_user_id, n.creat...
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, player_id.uuid, game_id.uuid, ser...
[ { "role": "user", "content": "What is the total session duration and total score across all sessions for each server status?", "sql": null }, { "role": "assistant", "content": "SELECT\n s.status,\n SUM(gs.duration_seconds) AS total_duration_seconds,\n SUM(gs.score) AS total_score\nFROM ga...
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": "List all citizens who submitted an application within 24 hours of registering. Show the application_id, citizen's full name, registration_date, and submitted_at timestamp.", "sql": null }, { "role": "assistant", "content": "SELECT\na.application_id,\n(c.first_na...
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": "How many rooms are currently marked as 'OutOfOrder'?", "sql": null }, { "role": "assistant", "content": "SELECT count(*) FROM hospitality_technology.rooms WHERE status = 'OutOfOrder';", "sql": null }, { "role": "user", "content": "Also, show 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 healthcare.patients ( patient_id character varying(64) NOT NULL, first_name characte...
[ { "role": "user", "content": "For each doctor, how many appointments did they have with female patients in the year 2024? Show doctor ID, first name, last name, and the count.", "sql": null }, { "role": "assistant", "content": "SELECT d.doctor_id, d.first_name, d.last_name, COUNT(a.appointme...
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.text, first_name.text, last_name.text, company_na...
[ { "role": "user", "content": "Show the invoice number, issue date, total amount, and the client's full name for all invoices, including only those invoices that have not been paid fully.", "sql": null }, { "role": "assistant", "content": "SELECT i.invoice_number, i.issue_date, i.total_amount...
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.claims ( claim_id character varying(64) NOT NULL, -- unique identifier...
[ { "role": "user", "content": "List the claim ID, policy ID, reported date, and settlement date for claims that have been processed by a claim handler.", "sql": null }, { "role": "assistant", "content": "SELECT claim_id, policy_id, reported_date, settlement_date\nFROM insurance.claims\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 insurance.policies ( policy_id text, customer_id text, product_id text, agent_id tex...
[ { "role": "user", "content": "I need to calculate the total premium and average deductible for each agent for policies issued this year.", "sql": null }, { "role": "assistant", "content": "SELECT agent_id,\n SUM(premium_amount) AS total_premium,\n AVG(deductible) AS ave...
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": "How many trips used more than 500 units of fuel, and what are their trip IDs and scheduled departure times?", "sql": null }, { "role": "assistant", "content": "SELECT t.trip_id, t.scheduled_departure, SUM(f.quantity) AS total_fuel\nFROM transportation.trips t\nJ...
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": "Provide a breakdown of the total number of applications submitted for each service category.", "sql": null }, { "role": "assistant", "content": "SELECT T2.category, count(T1.application_id) FROM applications AS T1 JOIN services AS T2 ON T1.service_id = T2.servic...
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 all NFTs on the blockchain with contract type 'ERC1155' and show their contract address, token id, and total number held by all wallets.", "sql": null }, { "role": "assistant", "content": "SELECT contract_address, token_id, SUM(CAST(amount AS INTEGER)) AS 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 smart_money_token_performance ( token_address text, token_symbol text, pnl numeric, ...
[ { "role": "user", "content": "What is the total net_flow and average realized_ratio for tokens on the Polygon chain?", "sql": null }, { "role": "assistant", "content": "SELECT SUM(net_flow) AS total_net_flow, AVG(realized_ratio) AS avg_realized_ratio\nFROM smart_money_token_performance\nWHER...
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, -- unique identifi...
[ { "role": "user", "content": "List usernames and bio information for users who have set a non-empty bio in their profile.", "sql": null }, { "role": "assistant", "content": "SELECT username, bio\nFROM social_media.users\nWHERE bio IS NOT NULL AND TRIM(bio) <> '';", "sql": null } ]