system
stringlengths
315
8.06k
conversations
listlengths
2
48
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.cases ( case_id character varying(64) NOT NULL, -- unique identi...
[ { "role": "user", "content": "Show me the total hours spent by each lawyer for each case, along with the case number and lawyer ID.", "sql": null }, { "role": "assistant", "content": "SELECT t.case_id, c.case_number, t.lawyer_id, SUM(t.hours_spent) AS total_hours\nFROM legal_services.time_en...
You are an expert in writing database language. You can write 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 the incident date, estimated loss, and the associated product name for all claims with an estimated loss greater than 20000.", "sql": null }, { "role": "assistant", "content": "SELECT c.incident_date, c.estimated_loss, p.product_name\nFROM insurance.clai...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.clients ( client_id character varying(64) NOT NULL, -- unique id...
[ { "role": "user", "content": "Show all law firms with more than one partner assigned. Display the law firm name and the number of partners.", "sql": null }, { "role": "assistant", "content": "SELECT lf.firm_name, COUNT(l.lawyer_id) AS partner_count\nFROM legal_services.law_firms lf\nJOIN leg...
You are an expert in writing database language. You can write 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 all users who commented on posts tagged with hashtag 'spring', showing user_id, comment_id, content, and tag_name.", "sql": null }, { "role": "assistant", "content": "SELECT c.user_id, c.comment_id, c.content, h.tag_name\nFROM social_media.comments c\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 gaming_technology.players ( player_id uuid PRIMARY KEY, username text, email text, p...
[ { "role": "user", "content": "Show me a list of players and, for each, list all the different games where they have acquired items. Also include the number of unique item types they've acquired per game.", "sql": null }, { "role": "assistant", "content": "SELECT p.player_id, p.username, g.ti...
You are an expert in writing database language. You can write 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": "For each service category, show the category and the number of distinct citizens who have scheduled at least one appointment for a service in that category. Order the results by the number of citizens in descending order.", "sql": null }, { "role": "assistant", ...
You are an expert in writing database language. You can write 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.appointments ( appointment_id.text, client_id.text, lawyer_id.text, c...
[ { "role": "user", "content": "Find all pairs of appointments that are scheduled for the same case and overlap in time. Show the IDs of the two overlapping appointments and the shared case ID.", "sql": null }, { "role": "assistant", "content": "SELECT t1.appointment_id AS appointment1_id, t2....
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.drivers ( driver_id.text, employee_id.text, first_name.text, last_nam...
[ { "role": "user", "content": "Show a count of drivers per status.", "sql": null }, { "role": "assistant", "content": "SELECT status, COUNT(*) AS driver_count\nFROM transportation.drivers\nGROUP BY status;", "sql": null }, { "role": "user", "content": "Can you also list the ea...
You are an expert in writing database language. You can write 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": "Find the average settlement_amount of closed claims for each claim handler. Return claim_handler_id and avg_settlement_amount.", "sql": null }, { "role": "assistant", "content": "SELECT c.claim_handler_id, AVG(c.settlement_amount) AS avg_settlement_amount\nFROM ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id text PRIMARY KEY, property_name text...
[ { "role": "user", "content": "Show all payments along with the guest's first and last name, and the staff member who processed each payment. Include payment_id, amount, currency_code, payment_timestamp, guest first_name, guest last_name, staff first_name, and staff last_name.", "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.agents ( agent_id character varying(64) NOT NULL, first_name character var...
[ { "role": "user", "content": "Show all active agents along with their respective managers' full names.", "sql": null }, { "role": "assistant", "content": "SELECT a.agent_id, a.first_name || ' ' || a.last_name AS agent_name, m.first_name || ' ' || m.last_name AS manager_name FROM insurance.ag...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.players ( player_id uuid NOT NULL DEFAULT gen_random_uuid(), -...
[ { "role": "user", "content": "Show usernames of players who own items of 'Legendary' rarity.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT T1.username FROM players AS T1 JOIN player_inventory AS T2 ON T1.player_id = T2.player_id JOIN in_game_items AS T3 ON T2.item_id = ...
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREA...
[ { "role": "user", "content": "What is the total number of vacation days taken by employee with ID 'EMP101' in the past year?", "sql": null }, { "role": "assistant", "content": "I'm sorry, but I can't provide information on the vacation days taken by an employee as this data is not stored 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 social_media.conversations ( conversation_id text PRIMARY KEY, created_at timestamp,...
[ { "role": "user", "content": "Show me all group chats with their names and the time they were last active.", "sql": null }, { "role": "assistant", "content": "SELECT group_name, last_message_at FROM social_media.conversations WHERE is_group_chat = TRUE;", "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.premium_payments ( payment_id text PRIMARY KEY, policy_id text, customer_i...
[ { "role": "user", "content": "Which customers have made more than three premium payments in 2024? Show the customer_id and the number of payments.", "sql": null }, { "role": "assistant", "content": "SELECT customer_id, COUNT(*) AS payment_count FROM insurance.premium_payments WHERE payment_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 hospitality_technology.services ( service_id text, property_id text, service_name te...
[ { "role": "user", "content": "List all food and beverage services (category = 'Food & Beverage') with their names, prices, and units, where the price is less than $20.", "sql": null }, { "role": "assistant", "content": "SELECT service_name, price, unit FROM hospitality_technology.services WH...
You are an expert in writing database language. You can write 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 PRIMARY KEY, citizen_id text,...
[ { "role": "user", "content": "Find all applications that were submitted in 2023 but received a decision ('Approved' or 'Rejected') in 2024. List the application ID, submitted date, decision date, and status.", "sql": null }, { "role": "assistant", "content": "SELECT application_id, submitted...
You are an expert in writing database language. You can write 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": "Show me all claims with police reports that were handled by agents hired in the last 2 years, along with the agent's full name and agency.", "sql": null }, { "role": "assistant", "content": "SELECT c.claim_id, c.policy_id, c.incident_date, c.police_report_number...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.reservations ( reservation_id text, property_id text, guest_i...
[ { "role": "user", "content": "How many reservations have been booked each month in 2023?", "sql": null }, { "role": "assistant", "content": "SELECT DATE_TRUNC('month', created_at) AS month,\n COUNT(*) AS reservation_count\nFROM hospitality_technology.reservations\nWHERE created_at >= '...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE blockchain.wallets ( wallet_id.text, user_id.text, address_id.text, private_key.text...
[ { "role": "user", "content": "Show me all wallet addresses that belong to user_id 'U12345'.", "sql": null }, { "role": "assistant", "content": "SELECT address_id FROM blockchain.wallets WHERE user_id = 'U12345';", "sql": null }, { "role": "user", "content": "Now join this wit...
You are an expert in writing database language. You can write 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": "Show the full names and contact emails of all citizens who have made a payment for an application that is currently in 'Pending' status.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT c.first_name || ' ' || c.last_name AS full_name, c.contac...
You are an expert in writing database language. You can write 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 users who commented on posts and the content of the post they commented on. Show commenter username and post content.", "sql": null }, { "role": "assistant", "content": "SELECT T1.username, T2.content FROM social_media.users AS T1 JOIN social_media.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 Use Hashes. Key pattern: 'component:<component_id>'. Example: HSET component:LGSTRUT01 part_numbe...
[ { "role": "user", "content": "Can you help me get a list of components and their associated materials, including the supplier information for each component?", "sql": null }, { "role": "assistant", "content": "SMEMBERS material_components:<material_id>\nHGETALL component:<component_id>\nHGET...
You are an expert in writing database language. You can write 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 character varying(64) NOT NULL, -- u...
[ { "role": "user", "content": "For each sector, retrieve the ticker symbol and last_updated timestamp of the earliest and latest updated securities, labeling them as earliest_ticker, earliest_updated, latest_ticker, and latest_updated.", "sql": null }, { "role": "assistant", "content": "WITH ...
You are an expert in writing database language. You can write 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": "For each trip, provide the trip_id, the total fuel quantity refueled, and the number of refueling events that occurred during the trip.", "sql": null }, { "role": "assistant", "content": "SELECT trip_id, SUM(quantity) AS total_fuel_quantity, COUNT(*) AS refuel_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 trading_platform.dapps ( dapp_id character varying(64) NOT NULL, -- unique iden...
[ { "role": "user", "content": "Show me the names and URLs of all DApps, and for each DApp, list the KYC status and last review date for all users who have an audit entry.", "sql": null }, { "role": "assistant", "content": "SELECT d.name AS dapp_name, d.url, k.user_id, k.status, k.reviewed_at\...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash varch...
[ { "role": "user", "content": "Show me the top 5 ERC20 tokens with the highest total supply, along with their names and contract addresses, but only include tokens where the price is greater than $0.1.", "sql": null }, { "role": "assistant", "content": "SELECT tm.name, tm.contract_address, tm...
You are an expert in writing database language. You can write 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 character varying(64) NOT NULL, route_id character va...
[ { "role": "user", "content": "Show me pairs of trip IDs that used the same vehicle.", "sql": null }, { "role": "assistant", "content": "SELECT\n t1.trip_id AS trip1_id,\n t2.trip_id AS trip2_id\nFROM transportation.trips AS t1\nJOIN transportation.trips AS t2\n ON t1.vehicle_id = t2.vehic...
You are an expert in writing database language. You can write 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": "I want to retrieve the agent ID, first and last name, along with their manager's contact email and phone number.", "sql": null }, { "role": "assistant", "content": "SELECT a.agent_id,\n a.first_name || ' ' || a.last_name AS agent_name,\n m.contact_em...
You are an expert in writing database language. You can write 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 manufacturing.components ( component_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "我想查询所有使用特定材料ID的组件信息,包括组件名称、零件编号和供应商ID,同时还需要获取该材料的名称和规格。", "sql": null }, { "role": "assistant", "content": "SELECT c.component_id, c.component_name, c.part_number, c.supplier_id, m.material_name, m.specification\nFROM manufacturing.components c\nJOIN manufacturi...
You are an expert in writing database language. You can write 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 text, user_id text, address text, private_key text, created...
[ { "role": "user", "content": "List all pairs of wallets that use the same private_key. Display w1.wallet_id, w1.user_id, w2.wallet_id, w2.user_id, and the shared private_key.", "sql": null }, { "role": "assistant", "content": "SELECT w1.wallet_id AS wallet1_id,\n w1.user_id AS user1_...
You are an expert in writing database language. You can write 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 PRIMARY KEY, username text, email text, passwo...
[ { "role": "user", "content": "Provide a summary for each transaction ID, showing the total amount of all its unspent UTXOs.", "sql": null }, { "role": "assistant", "content": "SELECT transaction_id, SUM(amount) FROM utxos WHERE spent = false GROUP BY transaction_id", "sql": null }, {...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.staff ( staff_id text, property_id text, first_name text, las...
[ { "role": "user", "content": "Show the number of staff members in each position and the average access level, grouping by position.", "sql": null }, { "role": "assistant", "content": "SELECT position,\n COUNT(*) AS staff_count,\n AVG(access_level) AS avg_access_level\nFROM hospit...
You are an expert in writing database language. You can write 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.assets ( asset_id character varying(64) NOT NULL, -- unique id...
[ { "role": "user", "content": "I want a list of DApp names and the asset symbols mentioned in their descriptions.", "sql": null }, { "role": "assistant", "content": "SELECT d.name AS dapp_name,\n a.symbol AS asset_symbol\nFROM trading_platform.dapps d\nJOIN trading_platform.assets a\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.invoices ( invoice_id text, invoice_number text, client_id text, case...
[ { "role": "user", "content": "Which invoices were issued in March 2024, and what are their invoice numbers, total amounts, and due dates?", "sql": null }, { "role": "assistant", "content": "SELECT invoice_number, total_amount, due_date FROM legal_services.invoices WHERE issue_date >= '2024-0...
You are an expert in writing database language. You can write 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": "Show me the average difficulty for blocks that have a previous block versus those that don't have a previous block.", "sql": null }, { "role": "assistant", "content": "SELECT CASE WHEN previous_block_id IS NULL THEN 'No Previous Block' ELSE 'Has Previous Block' ...
You are an expert in writing database language. You can write 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 PRIMARY KEY, medication_name text, gener...
[ { "role": "user", "content": "List all medications with a description that includes the word 'antibiotic'.", "sql": null }, { "role": "assistant", "content": "SELECT * FROM healthcare.medications WHERE description ILIKE '%antibiotic%';", "sql": null }, { "role": "user", "cont...
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 environmental impact assessments for the production of the Airbus A350 model?", "sql": null }, { "role": "assistant", "content": "I'm sorry, but I don't have access to data regarding the environmental impact assessments for the production of specifi...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.services ( service_id character varying(64) NOT NULL, propert...
[ { "role": "user", "content": "List all available services along with the property name where they are offered.", "sql": null }, { "role": "assistant", "content": "SELECT s.service_id, s.service_name, p.property_name\nFROM hospitality_technology.services s\nJOIN hospitality_technology.propert...
You are an expert in writing database language. You can write 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 social_media.users ( user_id character varying(64) NOT NULL, -- unique identifi...
[ { "role": "user", "content": "How many users have verified profiles and private profiles enabled?", "sql": null }, { "role": "assistant", "content": "SELECT COUNT(*) \nFROM social_media.users u\nJOIN social_media.user_settings s ON u.user_id = s.user_id\nWHERE u.is_verified = true AND s.priv...
You are an expert in writing database language. You can write 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": "Provide for each security its ticker_symbol, the most recent close_price and corresponding timestamp.", "sql": null }, { "role": "assistant", "content": "SELECT s.ticker_symbol, md.close_price, md.data_timestamp\nFROM financial_services.market_data md\nJOIN fina...
You are an expert in writing database language. You can write 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 all room types that offer 'WiFi' in their amenities.", "sql": null }, { "role": "assistant", "content": "SELECT room_type_id, property_id, type_name, amenities FROM hospitality_technology.room_types WHERE amenities LIKE '%WiFi%';", "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.room_types ( room_type_id character varying(64) NOT NULL,...
[ { "role": "user", "content": "Show each staff member's first name, last name, and the average base rate of room types available at the property where they work.", "sql": null }, { "role": "assistant", "content": "SELECT T1.first_name, T1.last_name, T2.avg_base_rate FROM 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 transportation.drivers ( driver_id character varying(64) NOT NULL, employee_id chara...
[ { "role": "user", "content": "List the names and cities of all locations that have at least one fuel log entry recorded.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT l.name, l.city\nFROM transportation.locations l\nJOIN transportation.fuel_logs f ON l.location_id = f.l...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.player_inventory ( inventory_id uuid PRIMARY KEY, player_id uuid, ...
[ { "role": "user", "content": "For each player, calculate the total quantity of items they have acquired. Return player_id and total_quantity.", "sql": null }, { "role": "assistant", "content": "SELECT player_id,\n SUM(quantity) AS total_quantity\nFROM gaming_technology.player_inventory...
You are an expert in writing database language. You can write 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.token_transfers ( transfer_id character varying(64) NOT NULL, -- unique id...
[ { "role": "user", "content": "Find cases where an address received tokens in one transfer and then sent tokens in another. List the receive transfer_id, the send transfer_id, the address, and both transfer values.", "sql": null }, { "role": "assistant", "content": "SELECT recv.transfer_id AS...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE financial_services.accounts ( account_id text, customer_id text, account_number text...
[ { "role": "user", "content": "List accounts that were opened in the same month and year as another account for the same customer, but have a different account type. Show the account_id, customer_id, account_type, and opened_date for these accounts.", "sql": null }, { "role": "assistant", "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.diagnoses ( diagnosis_id character varying(64) NOT NULL, -- unique id...
[ { "role": "user", "content": "I need to find all pairs of diagnoses for the same patient where one diagnosis is chronic and the other is non-chronic. Show patient_id, chronic diagnosis_id as chronic_id, non-chronic diagnosis_id as acute_id, chronic diagnosis_date, and acute diagnosis_date.", "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.locations ( location_id text PRIMARY KEY, name text, type text, addre...
[ { "role": "user", "content": "List all locations situated within the state of California.", "sql": null }, { "role": "assistant", "content": "SELECT location_id, name, city, state_province FROM transportation.locations WHERE state_province = 'CA';", "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 transportation.routes ( route_id text, route_number text, description text, origin_l...
[ { "role": "user", "content": "Which locations have received fuel logs greater than 300 liters in total? Please include the location name and city.", "sql": null }, { "role": "assistant", "content": "SELECT l.name AS location_name, l.city, SUM(f.quantity) AS total_quantity\nFROM transportatio...
You are an expert in writing database language. You can write 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": "Show me all patients who have had at least one appointment with a doctor specializing in 'Cardiology'. Include the patient's full name, appointment time, and doctor's full name.", "sql": null }, { "role": "assistant", "content": "SELECT p.patient_id, p.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 healthcare.appointments ( appointment_id.text, patient_id.text, doctor_id.text, appo...
[ { "role": "user", "content": "For each location, what is the average appointment duration? Show location_id and the average duration.", "sql": null }, { "role": "assistant", "content": "SELECT location_id, AVG(duration_minutes) FROM healthcare.appointments GROUP BY location_id;", "sql": ...
You are an expert in writing database language. You can write 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 PRIMARY KEY, username text, email text, p...
[ { "role": "user", "content": "Could you list each player's username and the total number of sessions they have played?", "sql": null }, { "role": "assistant", "content": "SELECT p.username, COUNT(gs.session_id) AS total_sessions\nFROM gaming_technology.players p\nLEFT JOIN 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 transportation.locations ( location_id character varying(64) NOT NULL, name characte...
[ { "role": "user", "content": "Get all pairs of locations in the same city, showing both location IDs, names, and the shared city.", "sql": null }, { "role": "assistant", "content": "SELECT l1.location_id AS location1_id, l1.name AS location1_name,\n l2.location_id AS location2_id, l2.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 blockchain.nodes ( node_id text PRIMARY KEY, ip_address text, port int, last_seen ti...
[ { "role": "user", "content": "Show me all nodes that were last seen in the past 30 days, along with their IP addresses and ports.", "sql": null }, { "role": "assistant", "content": "SELECT node_id, ip_address, port, last_seen FROM blockchain.nodes WHERE last_seen >= NOW() - INTERVAL '30 days...
You are an expert in writing database language. You can write 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": "List all appointments along with their subject and start time for lawyers specializing in 'Criminal Law'.", "sql": null }, { "role": "assistant", "content": "SELECT T1.subject, T1.start_time FROM legal_services.appointments AS T1 JOIN legal_services.lawyers 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 transportation.vehicles ( vehicle_id text PRIMARY KEY, license_plate text, vin text,...
[ { "role": "user", "content": "For each maintenance log, list the vehicle's license plate, the name of the mechanic, and the service date, ordered by most recent service first.", "sql": null }, { "role": "assistant", "content": "SELECT ml.log_id, v.license_plate, ml.mechanic_name, ml.service_...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.medical_records ( record_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "List each patient's first and last medical record entries, showing patient_id, earliest_record_id, earliest_record_date, latest_record_id, and latest_record_date.", "sql": null }, { "role": "assistant", "content": "SELECT\n fl.patient_id,\n fr.record_id AS...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.games ( game_id uuid PRIMARY KEY, title text, developer_id uuid, p...
[ { "role": "user", "content": "List all game sessions that lasted longer than 30 minutes. Show the session_id, player_id, game_id, and duration_seconds.", "sql": null }, { "role": "assistant", "content": "SELECT session_id, player_id, game_id, duration_seconds FROM gaming_technology.game_sess...
You are an expert in writing database language. You can write 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.text, name.text, type.text, address_line1.tex...
[ { "role": "user", "content": "List pairs of distinct locations in the same city that share the same location type. Show both location IDs, names, city, and the shared type.", "sql": null }, { "role": "assistant", "content": "SELECT L1.location_id AS location1_id, L1.name AS location1_name, L...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.games ( game_id.uuid, title.text, developer_id.uuid, publisher_id....
[ { "role": "user", "content": "I need a list of genres and pairs of game titles in the same genre.", "sql": null }, { "role": "assistant", "content": "SELECT g1.genre, g1.title AS game1, g2.title AS game2\nFROM gaming_technology.games g1\nJOIN gaming_technology.games g2\n ON g1.genre = g2.ge...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.tokens ( token_id text PRIMARY KEY, contract_address text, token_name text, tok...
[ { "role": "user", "content": "Find all pairs of tokens that have the same contract_address but different token_symbols. Show both token_ids, each token's symbol, and the shared contract_address.", "sql": null }, { "role": "assistant", "content": "SELECT t1.token_id AS token_id_1, t2.token_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.agencies ( agency_id character varying(64) NOT NULL, -- uniq...
[ { "role": "user", "content": "List the agency names and addresses for all service locations in the state of 'Florida'.", "sql": null }, { "role": "assistant", "content": "SELECT a.agency_name, l.address\nFROM government_services.service_locations l\nJOIN government_services.agencies a ON l.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 government_services.employees ( employee_id character varying(64) NOT NULL, -- u...
[ { "role": "user", "content": "List the full names of all employees who are currently employed (i.e., have no termination date).", "sql": null }, { "role": "assistant", "content": "SELECT first_name || ' ' || last_name AS full_name FROM government_services.employees WHERE termination_date 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.claims ( claim_id.text, policy_id.text, customer_id.text, incident_date.ti...
[ { "role": "user", "content": "List the claim ID, incident date, estimated loss, and the first and last name of the customer for all claims with an estimated loss greater than 5000.", "sql": null }, { "role": "assistant", "content": "SELECT T1.claim_id, T1.incident_date, T1.estimated_loss, T2...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.lawyers ( lawyer_id.text, first_name.text, last_name.text, bar_number...
[ { "role": "user", "content": "Can you show me the number of lawyers grouped by specialization?", "sql": null }, { "role": "assistant", "content": "SELECT specialization, COUNT(*) AS lawyer_count FROM lawyers GROUP BY specialization;", "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 trading_platform.users ( user_id character varying(64) NOT NULL, username character ...
[ { "role": "user", "content": "For each peer port, count how many peers have used that port.", "sql": null }, { "role": "assistant", "content": "SELECT port,\n COUNT(*) AS peer_count\nFROM trading_platform.peers\nGROUP BY port;", "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 social_media.users ( user_id text, username text, email text, password_hash text, fu...
[ { "role": "user", "content": "List the usernames and email addresses of users who have published posts with media_type 'video', along with the creation time of each post.", "sql": null }, { "role": "assistant", "content": "SELECT u.username, u.email, p.created_at\nFROM social_media.users u\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, -- unique ide...
[ { "role": "user", "content": "How many messages currently have a media file attached?", "sql": null }, { "role": "assistant", "content": "SELECT COUNT(*) FROM social_media.messages WHERE media_url IS NOT NULL;", "sql": null }, { "role": "user", "content": "For each user, show...
You are an expert in writing database language. You can write 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.wallets ( wallet_id character varying(64) NOT NULL, user_id charact...
[ { "role": "user", "content": "Count the number of metadata entries for each asset.", "sql": null }, { "role": "assistant", "content": "SELECT asset_id, COUNT(*) AS metadata_count\nFROM trading_platform.metadata\nGROUP BY asset_id;", "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 social_media.hashtags ( hashtag_id character varying(64) NOT NULL, tag_name characte...
[ { "role": "user", "content": "List all pairs of hashtags created on the same calendar date, showing both tag names and the creation date.", "sql": null }, { "role": "assistant", "content": "SELECT h1.tag_name AS tag1, h2.tag_name AS tag2, DATE(h1.created_at) AS created_date\nFROM social_medi...
You are an expert in writing database language. You can write 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 text, token_name text, token_symbol text, token_address t...
[ { "role": "user", "content": "Which exchange holds the largest total USD value of the token with the highest 24h price increase in the 'AI' narrative, and what is that value?", "sql": null }, { "role": "assistant", "content": "SELECT ctb.exchange, SUM(ctb.usd_value) AS total_usd_value\nFROM ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE smart_money_token_performance ( token_address text, token_symbol text, pnl numeric, ...
[ { "role": "user", "content": "For each chain, which token symbol has the highest pnl and what are its roi and avg_cost?", "sql": null }, { "role": "assistant", "content": "SELECT t.chain, t.token_symbol, t.pnl, t.roi, t.avg_cost\nFROM smart_money_token_performance t\nINNER JOIN (\n SELECT 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 social_media.hashtags ( hashtag_id.text, tag_name.text, created_at.timestamp )
[ { "role": "user", "content": "List all pairs of hashtags created within the same hour, including both hashtag IDs and their creation timestamps.", "sql": null }, { "role": "assistant", "content": "SELECT h1.hashtag_id AS hashtag1_id, h1.created_at AS created1, h2.hashtag_id AS hashtag2_id, h...
You are an expert in writing database language. You can write 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.loans ( loan_id character varying(64) NOT NULL, -- unique ide...
[ { "role": "user", "content": "Retrieve all pairs of loans for the same account where both loans are active and have different loan types. Show account_id, loan_id as loan_a, loan_type as type_a, loan_id as loan_b, and loan_type as type_b.", "sql": null }, { "role": "assistant", "content": "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 social_media.posts ( post_id character varying(64) NOT NULL, user_id character varyi...
[ { "role": "user", "content": "Show conversations that are group chats and have more than 5 participants. List the conversation_id and group_name.", "sql": null }, { "role": "assistant", "content": "SELECT c.conversation_id, c.group_name FROM social_media.conversations AS c 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 hospitality_technology.reviews ( review_id character varying(64) NOT NULL, property_...
[ { "role": "user", "content": "What is the average overall rating for each property?", "sql": null }, { "role": "assistant", "content": "SELECT property_id, AVG(rating_overall) AS avg_rating\nFROM hospitality_technology.reviews\nGROUP BY property_id;", "sql": null }, { "role": "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 trading_platform.users ( user_id text PRIMARY KEY, username text, email text, passwo...
[ { "role": "user", "content": "List all users who currently have a 'pending' KYC status, showing their user ID and username.", "sql": null }, { "role": "assistant", "content": "SELECT u.user_id, u.username FROM users u JOIN kyc_audit k ON u.user_id = k.user_id WHERE k.status = 'pending';", ...
You are an expert in writing database language. You can write 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": "Retrieve the policy_number, start_date, end_date, premium_amount, and corresponding product_name for policies with a coverage_limit greater than 500000.", "sql": null }, { "role": "assistant", "content": "SELECT p.policy_number, p.start_date, p.end_date, p.premi...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.policies ( policy_id character varying(64) NOT NULL, -- unique identif...
[ { "role": "user", "content": "List all policies that have been cancelled, showing the policy number, cancellation date, and reason.", "sql": null }, { "role": "assistant", "content": "SELECT policy_number, cancellation_date, cancellation_reason FROM insurance.policies WHERE status = 'Cancell...
You are an expert in writing database language. You can write 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 character varying(64) NOT NULL, route_number charac...
[ { "role": "user", "content": "I need a report showing each passenger's total number of bookings and the date of their most recent booking.", "sql": null }, { "role": "assistant", "content": "SELECT b.passenger_id,\n COUNT(*) AS total_bookings,\n MAX(b.booking_time) AS last_bookin...
You are an expert in writing database language. You can write 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.contracts ( contract_id.text, address.text, abi.text, bytecode.text, deployer_a...
[ { "role": "user", "content": "Count the number of tokens for each contract address.", "sql": null }, { "role": "assistant", "content": "SELECT contract_address, COUNT(*) AS token_count FROM web3.tokens GROUP BY contract_address;", "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 legal_services.time_entries ( entry_id text PRIMARY KEY, case_id text, lawyer_id tex...
[ { "role": "user", "content": "List all time entries that do not have a description, including the entry ID, date worked, hours spent, and the first and last name of the lawyer who recorded the entry.", "sql": null }, { "role": "assistant", "content": "SELECT te.entry_id, te.date_worked, te.h...
You are an expert in writing database language. You can write 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 PRIMARY KEY, username text, email text, passwo...
[ { "role": "user", "content": "Show me the usernames and emails of all users who have placed at least one 'buy' order for the asset named 'Bitcoin'.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT T1.username, T1.email FROM trading_platform.users AS T1 JOIN trading_platfor...
You are an expert in writing database language. You can write 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.", "sql": null }, { "role": "assistant", "content": "SELECT type_name, AVG(base_rate) FROM hospitality_technology.room_types GROUP ...
You are an expert in writing database language. You can write 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.contracts ( contract_id character varying(64) NOT NULL, address character varyi...
[ { "role": "user", "content": "List all events and any token transfers that occurred in the same transaction, showing event_id, event_name, transfer_id, and token_symbol.", "sql": null }, { "role": "assistant", "content": "SELECT\n e.event_id,\n e.event_name,\n tt.transfer_id,\n tk.token_...
You are an expert in writing database language. You can write 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.transactions ( transaction_id character varying(64) NOT NULL,...
[ { "role": "user", "content": "How many transactions are there for each status?", "sql": null }, { "role": "assistant", "content": "SELECT status, COUNT(*) AS transaction_count FROM financial_services.transactions GROUP BY status;", "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 legal_services.time_entries ( entry_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "I want to see all time entries where the description contains the word 'draft' and that have not been billed yet.", "sql": null }, { "role": "assistant", "content": "SELECT *\nFROM legal_services.time_entries\nWHERE description ILIKE '%draft%'\n AND is_billed =...
You are an expert in writing database language. You can write 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": "For each account, show the account number, currency, and the sum of all incoming transaction amounts, where an incoming transaction is one where the account appears as related_account_id.", "sql": null }, { "role": "assistant", "content": "SELECT a.account_numbe...
You are an expert in writing database language. You can write 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": "Find all ERC20 tokens (from token_metas) currently held by wallet '0xfoo...' with a balance over 1000. Show the contract address and amount.", "sql": null }, { "role": "assistant", "content": "SELECT contract_address, amount\nFROM erc20_balances\nWHERE wallet_ad...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure // Node Label: :Station // Properties: // station_id: String (Constraint: UNIQUE) // station_...
[ { "role": "user", "content": "Can you retrieve the total number of train cars for each train in the database?", "sql": null }, { "role": "assistant", "content": "MATCH (t:Train)<-[:PART_OF_TRAIN]-(tc:TrainCar)\nRETURN t.train_id, t.train_number, COUNT(tc) AS total_cars\nORDER BY t.train_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 erc1155_approval_for_all ( block_number bigint NOT NULL, -- Block number contain...
[ { "role": "user", "content": "Which ERC1155 NFT contracts have received approval-for-all events, and for each contract, how many total approval events were recorded?", "sql": null }, { "role": "assistant", "content": "SELECT contract_address, COUNT(*) AS approval_count FROM erc1155_approval_...
You are an expert in writing database language. You can write 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.loans ( loan_id text, account_id text, loan_type text, principal_...
[ { "role": "user", "content": "Show me all loans with a term longer than 36 months, including their loan_id, account_id, and principal_amount.", "sql": null }, { "role": "assistant", "content": "SELECT loan_id, account_id, principal_amount FROM financial_services.loans WHERE term_months > 36;...
You are an expert in writing database language. You can write 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": "I need to find users who have liked both a post and a comment on the same day. For each such user and date, list user_id, date, post_id, and comment_id.", "sql": null }, { "role": "assistant", "content": "SELECT p.user_id, DATE(p.created_at) AS like_date, p.post...
You are an expert in writing database language. You can write 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": "List the diagnosis_id, patient_id, and doctor_id for all diagnoses with status 'Pending' and is_chronic set to TRUE.", "sql": null }, { "role": "assistant", "content": "SELECT diagnosis_id, patient_id, doctor_id FROM healthcare.diagnoses WHERE status = 'Pending'...
You are an expert in writing database language. You can write 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": "Show me all service orders for spa services in the last month, including the guest name and staff who delivered the service.", "sql": null }, { "role": "assistant", "content": "SELECT so.order_id, g.first_name, g.last_name, s.service_name, st.first_name AS staff...
You are an expert in writing database language. You can write 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.service_orders ( order_id text PRIMARY KEY, reservation_id te...
[ { "role": "user", "content": "List all service orders with quantity greater than 3, showing the order ID, total price, and the staff member who placed the order.", "sql": null }, { "role": "assistant", "content": "SELECT order_id, total_price, staff_id_ordered\nFROM hospitality_technology.se...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.doctors ( doctor_id text, first_name text, last_name text, specialty text...
[ { "role": "user", "content": "Count the total number of distinct specialties listed in the doctors table.", "sql": null }, { "role": "assistant", "content": "SELECT count(DISTINCT specialty) FROM healthcare.doctors;", "sql": null }, { "role": "user", "content": "Show the lice...
You are an expert in writing database language. You can write 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 character varying(64) NOT NULL, first_name charact...
[ { "role": "user", "content": "Count the number of premium payments that have a null payment method.", "sql": null }, { "role": "assistant", "content": "SELECT COUNT(*) AS null_payment_method_count\nFROM insurance.premium_payments\nWHERE payment_method IS NULL;", "sql": null }, { ...