Dataset Viewer
Auto-converted to Parquet Duplicate
question_id
stringlengths
30
30
schema_id
stringlengths
13
13
sql
stringlengths
8
6.56k
difficulty
stringclasses
3 values
questions
dict
relevant_tables
stringlengths
6
1.41k
number_of_relevant_tables
int64
1
20
execution_result
stringlengths
2
63.5k
schema_015343_s0_q6_0d885a674b
schema_015343
SELECT p.id AS prescription_id, p.medication_name, p.dosage, t.treatment_type, cis.findings FROM prescriptions p JOIN treatments t ON p.treatment_id = t.id JOIN vet_visits vv ON t.vet_visit_id = vv.id JOIN clinic_imagery_studies cis ON vv.id = cis.vet_visit_id
hard
{ "verbose": "Generate a comprehensive report listing all prescriptions, their associated treatment types, and the specific imaging findings (if any) from the same veterinary visit, filtering only for visits that had both a prescription and an imaging study recorded.", "evidence_supported": "Which veterinary visits...
["clinic_imagery_studies", "pet_medical_condition_treatment", "pet_medication_follow_up", "prescriptions", "treatments", "vet_visits"]
6
[["P-00056", "Ranitidine", "172.0 ml, Every 12 hours", "Heartworm Prevention", "Imaging reveals mass lesion observed affecting the pelvis, consistent with clinical signs."], ["P-00037", "Tramadol", "247.9 tabs, Once daily", "Heartworm Prevention", "Radiographic evidence suggests intestinal gas pattern abnormality withi...
schema_005268_s0_q0_8448a0973c
schema_005268
SELECT content FROM DocumentVersion WHERE author = 8
simple
{ "verbose": "Find the full DDL script content stored in the system that was authored by the user with ID 8, as we need to review the specific changes they implemented.", "evidence_supported": "Retrieve the complete DDL script content authored by the user with ID 8 for our implementation review., evidence: The 'ful...
["DocumentVersion", "Milestone", "Project", "Task", "TaskDependency"]
5
[["b'ALTER TABLE `audit_log` ADD COLUMN new_field VARCHAR(255);'"], ["b'CREATE TABLE IF NOT EXISTS `payments` (\\nid BIGINT PRIMARY KEY,\\norder_id BIGINT,\\namount DECIMAL(10,2),\\ncurrency CHAR(3),\\npayment_method VARCHAR(50)\\n);'"], ["b'ALTER TABLE `sessions` ADD COLUMN new_field VARCHAR(255);'"]]
schema_017318_s0_q5_f6d092aef1
schema_017318
SELECT t.provider, u.email FROM ThirdPartyLogins t JOIN Users u ON t.uid = u.uid WHERE t.expires_at > datetime('now')
moderate
{ "verbose": "Identify the providers of third-party logins that are currently valid (not expired as of the latest recorded expiration) for any user, and return the provider name along with the user's email address.", "evidence_supported": "Which third-party login providers remain valid for any user, and what are th...
["NotificationSettings", "SavedSearchQueries", "StoryViews", "ThirdPartyLogins", "UserDeviceUsage", "UsernameChangeLog", "Users"]
7
[["Google", "macarthur.oflynn@auth-rust.dev"], ["LinkedIn", "denney.freestone@auth-rust.dev"], ["LinkedIn", "overall.ingham@auth-rust.dev"], ["Google", "tilson.tailor@rauth.io"], ["Facebook", "keight.nisbet@rauth.io"], ["LinkedIn", "tutton.godby@auth-rust.dev"], ["Google", "tedd.cosgrove@rauth.io"], ["GitHub", "barr.do...
schema_003399_s3_q4_a5344fb4bb
schema_003399
SELECT STARTED_BY, COUNT(*) AS instance_count FROM BPM_PROCESS_INSTANCE GROUP BY STARTED_BY HAVING COUNT(*) > 1 ORDER BY instance_count DESC
moderate
{ "verbose": "Group the process instances by the user who started them and count how many instances each user has initiated, but only include users who have started more than one instance.", "evidence_supported": "Which users have initiated more than one process instance? List the count for each user who meets this...
["BPM_PROCESS_INSTANCE", "BPM_PROCESS_INSTANCE_METADATA"]
2
[[32, 82], [23, 54], [36, 28], [22, 23], [2, 21], [19, 20], [17, 19], [21, 13], [61, 11], [33, 11], [49, 10], [65, 9], [29, 7], [50, 6], [45, 5], [30, 5], [4, 5], [69, 4], [55, 4], [41, 3], [27, 3], [58, 2], [39, 2]]
schema_010335_s3_q0_7f7639deb4
schema_010335
SELECT response_text, response_date FROM review_responses WHERE restrauntid = 2
simple
{ "verbose": "Find the text of the response provided by the restaurant with ID 2 to a customer review, along with the date that response was posted.", "evidence_supported": "What is the response text and posting date for the reply made by Shawarma restaurant ID 2 to a customer review?, evidence: Restaurant ID 2 is ...
["feature_assignments", "menu_customizations", "order_payment", "review_responses"]
4
[["We appreciate you visiting Shawarma UWin. Food temperature was perfect when served. Please let us know if there is anything else we can do.", "2021-02-23"], ["Glad you enjoyed your meal! Best shawarma in town, highly recommended! Have a great day!", "2020-02-29"], ["We appreciate you visiting Shawarma UWin. Clean en...
schema_015343_s1_q5_118a66c34e
schema_015343
SELECT id, service_name FROM grooming_services WHERE description LIKE '%Intensive%'
moderate
{ "verbose": "A client is interested in high-intensity preparation for a competition, so please retrieve the service ID and name for the service whose description contains the word 'Intensive'.", "evidence_supported": "Retrieve the ID and name of services whose descriptions include the word 'Intensive'., evidence: ...
["grooming_services"]
1
[["GS-0021", "Show Prep Groom"]]
schema_021764_s1_q6_5ca615347a
schema_021764
SELECT ROLE_ID, ROLE_LEVEL FROM LOA_ROLE WHERE ROLE_NAME = 'Procurement Specialist';
moderate
{ "verbose": "List the role ID and role level for the role named \"Procurement Specialist\", as this information is needed to configure the access control list for the procurement department's automated workflows.", "evidence_supported": "What are the role ID and role level for the 'Procurement Specialist' role?, e...
["LOA_PERMISSION", "LOA_PERMISSION_RELATION", "LOA_ROLE", "LOA_ROLE_RELATION", "LOA_USER_INFO", "ORG_INFO"]
6
[["ROLE_0051", "Admin"]]
schema_006340_s0_q4_7f20164f36
schema_006340
SELECT po.portfolioId, po.result AS optimization_result, fr.threshold AS interest_rate_risk_threshold FROM portfolio_optimizer po LEFT JOIN financial_risk_reporting fr ON po.portfolioId = fr.portfolioId AND fr.riskCategory = 'Interest Rate Risk' WHERE po.portfolioId = 44 AND po.criteria = 'mean_v...
moderate
{ "verbose": "Find the portfolio ID and the result of the optimization run for portfolio 44 using the 'mean_variance_optimization' criteria, and join with the risk reporting table to see if there is a recorded 'Interest Rate Risk' threshold for this specific portfolio.", "evidence_supported": "What is the mean-vari...
["financial_risk_reporting", "investment_theme_performance", "portfolio", "portfolio_dividend_distributions", "portfolio_fee_exemptions", "portfolio_optimizer", "portfolio_performance_forecast"]
7
[[44, 0.5924, 0.0310197875788242]]
schema_019069_s2_q7_d28859f1ce
schema_019069
WITH promo_totals AS ( SELECT order_id, SUM(discount_amount) AS total_promo_discount FROM SITE_DB_order_promotions GROUP BY order_id ), discount_totals AS ( SELECT order_id, SUM(discount_value) AS total_standard_discount FROM SITE_DB_order_discounts GROUP BY order_id ), qua...
hard
{ "verbose": "Identify the promotion codes that have been applied to orders where the total discount amount from promotions exceeds the total discount value from standard order discounts for the same order, and include the order ID and the difference in discount amounts to highlight significant promotional savings.",...
["SITE_DB_cart_items_log", "SITE_DB_order_discounts", "SITE_DB_order_promotions", "SITE_DB_order_refunds_log", "SITE_DB_order_returns_items", "SITE_DB_order_statuses_log", "SITE_DB_site_coupons", "SITE_DB_site_coupons_users", "SITE_DB_site_currency_log", "SITE_DB_site_newsletter_subscribers", "SITE_DB_site_shipping", "...
17
[[1000, "SAVE10", 100.16], [1001, "WELCOME20", 128.34], [1002, "SUMMER15", 128.43], [1003, "HOLIDAY25", 94.01], [1004, "FLASH30", 79.28], [1005, "VIP50", 115.25], [1006, "NEWUSER15", 132.26], [1007, "LOYALTY10", 96.52], [1008, "FREESHIP", 92.81], [1009, "BUNDLE20", 20.65], [1010, "SAVE10", 128.23], [1011, "WELCOME20", ...
schema_016173_s3_q4_8e6b49fcef
schema_016173
SELECT bq.QUEUE_NAME, bq.MAX_JOB_IN_QUEUE FROM BATCH_QUEUE bq JOIN COMPUTE_RESOURCE cr ON bq.COMPUTE_RESOURCE_ID = cr.RESOURCE_ID WHERE cr.MAX_MEMORY_NODE > 256;
moderate
{ "verbose": "Find the queue names and their maximum job limits for all queues associated with compute resources that have a maximum memory per node greater than 256 GB.", "evidence_supported": "Which compute queues have a maximum job limit, linked to resources exceeding 256 GB of maximum memory per node?, evidence...
["BATCH_QUEUE", "COMPUTE_RESOURCE", "DATA_MOVEMENT_INTERFACE", "GROUP_RESOURCE_MEMBERSHIP", "HOST_IPADDRESS", "LIBRARY_APEND_PATH", "RESOURCE_MAINTENANCE_SCHEDULE", "RESOURCE_TAG_MAPPING", "USER_ACCESS_PERMISSION", "USER_ROLE_ASSIGNMENT"]
10
[["Grid_TaskList_7", 2896], ["Grid_Pool_25", 1840], ["Batch_ExecutionQueue_27", 575], ["HPC_JobStream_32", 4607], ["Compute_ExecutionQueue_36", 423], ["Compute_TaskList_39", 1167]]
schema_018076_s3_q5_07c47159ef
schema_018076
SELECT GADGET_TITLE, GADGET_DESCRIPTION, GADGET_AUTHOR_EMAIL FROM GS_GADGET WHERE GADGET_GROUP = 'Productivity Suite';
moderate
{ "verbose": "I need to identify all gadgets that are part of the \"Productivity Suite\" group so we can review their documentation. Please retrieve the gadget title, description, and the author's email address for every gadget belonging to the \"Productivity Suite\" group.", "evidence_supported": "Retrieve the tit...
["GS_GADGET", "GS_GADGET_ACCESS_GRANT_LOG", "GS_GADGET_AUDIT_ANNOTATIONS", "GS_GADGET_DATA_EXPORT_LOG", "GS_GADGET_HISTORY", "GS_GADGET_SPONSORSHIP", "GS_GADGET_USAGE_LOG", "GS_GADGET_USAGE_STATS", "GS_USER"]
9
[["Enterprise Applet in Tomcat", "A secure enterprise gadget leveraging Apache Shindig for seamless integration with SAML-based authentication systems. - Instance ID: 007. Optimized for performance and scalability in high-traffic enterprise environments.", "hegney@enterprise-social.net"], ["Smart Extension on JBoss AS7...
schema_020541_s3_q7_bd94b9cd0f
schema_020541
SELECT dst.CODE, dst.DESCRIPTION, s.NAME, sv.AUTHOR_ID FROM DATA_STORE_SERVICES dss JOIN DATA_STORE_SERVICE_DATA_SET_TYPES dsds ON dsds.DATA_STORE_SERVICE_ID = dss.ID JOIN DATA_SET_TYPES dst ON dst.ID = dsds.DATA_SET_TYPE_ID JOIN scripts s ON s.ID = dst.VALIDATION_SCRIPT_ID JOIN SCRIPT_VERSIONS sv ON sv.SCRIPT_ID = s.I...
hard
{ "verbose": "Identify the data set type codes that are supported by data store services labeled 'ImagHub', and for each such type, provide the description, the script name used for validation, and the author ID of the most recent active version of that validation script.", "evidence_supported": "For ImagHub data s...
["DATA_MIGRATION_PROGRESS", "DATA_SET_TYPES", "DATA_SET_TYPE_PROPERTY_TYPES", "DATA_STORES", "DATA_STORE_SERVICES", "DATA_STORE_SERVICE_DATA_SET_TYPES", "MATERIAL_TYPE_PROPERTY_TYPES", "SAMPLE_TYPES", "SCRIPT_VERSIONS", "scripts"]
10
[["FMRI_BOLD", "Single-cell ATAC-seq data aligned to hg38 genome with cell barcodes", "filter_low_quality_samples", "PER-00030"]]
schema_004362_s2_q5_fa380ac74b
schema_004362
SELECT DISTINCT al.user_id FROM access_log al JOIN migration_history mh ON al.test_table_id = mh.test_table_id
moderate
{ "verbose": "Find the user IDs of users who accessed test tables that have undergone at least one migration, joining the access logs with migration history to filter for tables with a migration record.", "evidence_supported": "Which users accessed test tables that have been modified by at least one migration?, evi...
["access_log", "job_worker_assignment", "migration_history", "test_table"]
4
[["user_pickard_preston"], ["user_swan_holloway"], ["user_gale_piper"], ["user_deverell_bower"], ["user_dunford_milner"], ["user_viner_metcalfe"], ["user_alldridge_jennings"], ["user_macaulay_kings"], ["user_sneddon_irving"], ["user_everett_moreno"], ["user_harper_atherley"], ["user_devenish_lilwall"], ["user_watkinson...
schema_018924_s0_q1_bd3ee9ebff
schema_018924
SELECT p.nm_produto, p.vl_preco FROM tb_produto p JOIN tb_categoria_produto c ON p.cd_categoria_produto = c.cd_categoria_produto WHERE c.nm_categoria = 'Moda - Vestidos';
simple
{ "verbose": "List the name and price of all products that belong to the category named 'Moda - Vestidos'.", "evidence_supported": "What are the names and prices for all products categorized under 'Moda - Vestidos'?, evidence: 'Moda - Vestidos' is the specific category name identifying the group of products to incl...
["tb_aviso", "tb_categoria_produto", "tb_item_pedido", "tb_pagamento", "tb_pedido_avaliacao", "tb_pedido_pagamento", "tb_pedido_pagamento_forma_pedido", "tb_pedido_pagamento_item", "tb_pedido_pagamento_log", "tb_pedido_pagamento_log_det", "tb_pedido_pagamento_parcela", "tb_pedido_pagamento_status", "tb_perfil", "tb_per...
19
[["Lightweight Accessory Model 149", 61.51], ["Smart Gadget Type-K", 136.21]]
schema_021764_s2_q4_d301021607
schema_021764
SELECT t.TASK_NO, t.TASK_PERSON, COUNT(p.PCR_ID) AS PCR_RUN_COUNT FROM LAB_TASK_INFO t LEFT JOIN LAB_PCR_INFO p ON t.TASK_ID = p.TASK_ID WHERE t.TASK_STATUS = 'In Progress' GROUP BY t.TASK_ID, t.TASK_NO, t.TASK_PERSON ORDER BY t.TASK_NO
moderate
{ "verbose": "For each laboratory task that is currently 'In Progress', list the task number, the assigned task person, and the total number of PCR runs associated with that task.", "evidence_supported": "List the task number and assigned person for all laboratory tasks currently in progress, along with the total c...
["AM_ASSESSMENT_RECORD", "DICT_INFO", "DICT_ITEM", "ERS_REPORT_RECORD", "LAB_EXTRACT_INFO", "LAB_PCR_INFO", "LAB_SY_INFO", "LAB_SY_SAMPLE", "LAB_TASK_INFO", "LOA_PERMISSION", "LOA_PERMISSION_RELATION", "LOA_ROLE", "LOA_ROLE_RELATION", "LOA_USER_INFO", "MATCH_CASE_RESULT", "ORG_INFO"]
16
[["LAB-2021-0017", "Irving", 3], ["LAB-2021-0027", "Phelps", 2], ["LAB-2023-0002", "Downer", 1], ["LAB-2024-0007", "Hammond", 1], ["LAB-2024-0012", "Ivory", 0], ["LAB-2024-0022", "Porter", 1]]
schema_007376_s1_q6_b36d52351f
schema_007376
WITH max_logs AS ( SELECT task_id, MAX(log_time) AS max_log_time FROM task_stage_logs GROUP BY task_id ) SELECT t.task_id, t.log_message, u.id FROM task_stage_logs t INNER JOIN max_logs m ON t.task_id = m.task_id AND t.log_time = m.max_log_time INNER JOIN users u ON t.created_by = u.id
hard
{ "verbose": "Find the most recent log entry for each task by identifying the maximum log time for each task ID, and join this result with the users table to return the task ID, the most recent log message, and the user ID of the creator.", "evidence_supported": "For each task, retrieve the user ID of the creator a...
["task_stage_logs"]
1
[["task-0001", "Failed system feature access grant: successfully authenticated via OAuth2", "user-0038"], ["task-0002", "Initiated security audit trail update: session found valid within TTL window", "user-0010"], ["task-0003", "Expired CSRF token generation: rate limit exceeded for login attempts", "user-0002"], ["tas...
schema_006340_s3_q1_a3c7e461ac
schema_006340
SELECT description, debit FROM transaction_journal WHERE portfolioId = 27 AND timestamp LIKE '2021-09-09%' AND description LIKE '%monthly interest accrual%'
simple
{ "verbose": "Find the description and the debit amount for the transaction journal entry that occurred on 2021-09-09 for portfolio 27, specifically looking for the monthly interest accrual event.", "evidence_supported": "What is the description and debit amount for the monthly interest accrual transaction journal ...
["financial_risk_reporting", "investment_theme_performance", "portfolio", "portfolio_dividend_distributions", "portfolio_fee_exemptions", "portfolio_performance_forecast", "strategic_asset_allocation", "transaction_journal"]
8
[["Monthly interest accrual on cash balance sweep account", 416.01]]
schema_011385_s0_q0_d1de848716
schema_011385
SELECT email, firstName FROM user WHERE associatedVenue = 'VEN-0218'
simple
{ "verbose": "Retrieve the email addresses and first names of all users who are currently associated with the venue identified as 'VEN-0218'.", "evidence_supported": "What are the first names and email addresses of users currently associated with venue VEN-0218?, evidence: Venue VEN-0218 is the specific location id...
["registrationCode", "registrationRedemption", "user"]
3
[["reilly.kennard@outlook.com", "Reilly"], ["jenas.flack@gmail.com", "Jenas"]]
schema_011349_s2_q5_e2fb719b23
schema_011349
SELECT sl.action_type, sl.action_time, u.username FROM mf_tracker_systemlog sl JOIN mf_tracker_user u ON sl.user_id = u.user_id WHERE sl.action_type = 'ADD_INVESTMENT';
moderate
{ "verbose": "**Simple 3**: Find the action type and action time for all system log entries where the user performed an \"ADD_INVESTMENT\" action, and join with the user table to show the username of the person who performed the action.", "evidence_supported": "What usernames performed the 'ADD_INVESTMENT' action, ...
["mf_tracker_citizenshipfundcontribution", "mf_tracker_comparison", "mf_tracker_investmentgoal", "mf_tracker_investmentgoalprogress", "mf_tracker_portfolioshare", "mf_tracker_systemlog", "mf_tracker_user", "mf_tracker_useronboardinghistory"]
8
[["ADD_INVESTMENT", "2021-03-30 23:12:29", "hsoler163"], ["ADD_INVESTMENT", "2023-03-21 22:41:08", "fchavez411"], ["ADD_INVESTMENT", "2022-12-07 13:39:24", "saquino111"], ["ADD_INVESTMENT", "2021-07-29 22:11:39", "gméndez803"], ["ADD_INVESTMENT", "2023-11-05 18:54:09", "hdolan79"]]
schema_001317_s2_q2_29bbecd627
schema_001317
SELECT tema_nombre, idioma_pref FROM T_UI_PREFERENCES WHERE id_usuario = 'USR-9136'
simple
{ "verbose": "List the UI preference theme name and language preference for the user with ID 'USR-9136' to check their current interface settings.", "evidence_supported": "What is the UI theme name and language setting for user USR-9136?, evidence: User ID format is USR-XXXX. UI preferences include theme name and l...
["T_EMAIL_CAMPAIGN_TRACK", "T_PAYMENT_FEES", "T_UI_PREFERENCES"]
3
[["Real_Time_Tracker_Vivid", "fr-FR"]]
schema_018337_s1_q1_9d4593d605
schema_018337
SELECT NAME, DESCRIPTION FROM WHITELIST_APP WHERE ID = 58
simple
{ "verbose": "List the name and description of the application with ID 58 from the whitelist applications.", "evidence_supported": "What are the name and description for the application identified by ID 58 within the whitelist?, evidence: Whitelist applications are authorized software entries. ID 58 uniquely identi...
["G_ServerType_LicenseInfo", "WHITELIST_APP", "WHITELIST_APP_AccessPermissions", "WHITELIST_APP_PublicEndpoints", "WHITELIST_APP_UserRoles"]
5
[["Lemon Contract Manager_58_v3", "Provides content publishing tools for internal company news. Configured for Admin department, instance 58."]]
schema_005268_s1_q2_89a909539c
schema_005268
SELECT owner FROM ProjectTemplate WHERE name = 'Refactored Release Final'
simple
{ "verbose": "Find the user ID of the person who owns the project template named 'Refactored Release Final', as I need to contact them to discuss the template's suitability for our current batch of schema synchronizations.", "evidence_supported": "Who owns the 'Refactored Release Final' project template, and what i...
["Bookmark", "Milestone", "Project", "ProjectTemplate", "ProjectTemplateTask"]
5
[[1]]
schema_001317_s2_q0_980be74deb
schema_001317
SELECT SUM(open_count) AS total_opens, id_usuario FROM T_EMAIL_CAMPAIGN_TRACK WHERE campaign_name = 'Monthly Regulatory Filing Reminder - Phase 1' GROUP BY id_usuario
simple
{ "verbose": "What is the total number of email opens recorded for the 'Monthly Regulatory Filing Reminder - Phase 1' campaign, and which user ID is associated with this specific campaign record?", "evidence_supported": "How many times was the 'Monthly Regulatory Filing Reminder - Phase 1' campaign email opened, an...
["T_EMAIL_CAMPAIGN_TRACK", "T_PAYMENT_FEES", "T_UI_PREFERENCES"]
3
[[19, "USR-4111"]]
schema_019069_s3_q0_00569de334
schema_019069
SELECT log_message FROM SITE_DB_order_refunds_log ORDER BY id ASC LIMIT 1;
simple
{ "verbose": "Find the log message associated with the refund record that has the lowest unique identifier in the refund logs table.", "evidence_supported": "What is the log message for the refund with the smallest ID?, evidence: Refund ID is a unique numeric identifier. Smallest ID refers to the minimum value.", ...
["SITE_DB_order_refunds_log", "SITE_DB_user_group_message_replies"]
2
[["Partial refund issued: item returned"]]
schema_010065_s1_q0_6af326d9fd
schema_010065
SELECT calculation_eval_id, out_val FROM calculation_eval WHERE calculation_alias_name = 'Standard Age Check'
simple
{ "verbose": "Find the unique identifier and the calculated output value for the evaluation record associated with the calculation alias 'Standard Age Check'.", "evidence_supported": "What is the unique ID and calculated result for the evaluation record linked to the 'Standard Age Check' alias?, evidence: The evalu...
["calculation_eval", "calculation_parameter_def_x", "experiment", "measure", "measure_x"]
5
[["CE-00001", "34.96"], ["CE-00011", "348.02"], ["CE-00021", "845.74"], ["CE-00031", "341.52"], ["CE-00041", "77.55"], ["CE-00051", "36.76"], ["CE-00061", "48.80"]]
schema_018292_s0_q2_007b3e61e6
schema_018292
SELECT user_id, SUM(hours_worked) AS total_hours FROM time_sheet_entries WHERE user_id = 'user-20' GROUP BY user_id
simple
{ "verbose": "List the user ID and the total number of hours worked by the user with ID 'user-20' from the time sheet entries table.", "evidence_supported": "What is the total hours worked by employee user-20?, evidence: Hours are summed from time sheet entries for the specified user ID.", "structured": "From the...
["employee_app_feedback", "holiday_exceptions", "public_holidays", "restriction_exceptions", "role_permissions", "supervisor_comments", "task_assignments", "time_sheet_approvals", "time_sheet_entries", "training_feedback", "training_registrations", "vacation_applications", "vacation_restrictions", "vacation_status_hist...
14
[["user-20", 5.23]]
schema_000876_s0_q4_65e9b2e285
schema_000876
SELECT DISTINCT o.id AS order_id, o.total_price FROM public_orders o JOIN public_order_items oi ON o.id = oi.order_id WHERE oi.discount > 0.2 ORDER BY o.id;
moderate
{ "verbose": "List the order IDs and their total prices for orders that contain at least one item with a discount greater than 0.2, requiring a join between orders and order items to filter based on item-level attributes.", "evidence_supported": "Which orders include at least one item with a discount exceeding 20%?...
["public_demand_forecast_accuracy", "public_order_items", "public_orders", "public_product_reviews", "public_products"]
5
[[1, 38.83], [2, 33.72], [3, 36.12], [4, 38.0], [5, 104.16], [6, 37.88], [7, 60.7], [8, 76.37], [9, 26.12], [10, 24.93], [11, 68.29], [12, 47.86], [13, 21.32], [14, 20.04], [15, 18.16], [16, 34.15], [17, 197.39], [18, 38.85], [19, 15.0], [20, 18.33], [21, 54.91], [22, 33.89], [23, 31.65], [24, 12.4]]
schema_020438_s0_q5_85597e78e3
schema_020438
SELECT c.nombre, c.apellido FROM cliente c WHERE c.id IN ( SELECT bc.cliente_id FROM beneficiarios_cliente bc GROUP BY bc.cliente_id HAVING COUNT(*) > 1 ) AND c.id NOT IN ( SELECT DISTINCT p.cliente_id FROM prestamos_concesionados p JOIN prestamos_pagos_programados pp ON p.id = pp.prestamo_i...
moderate
{ "verbose": "Find the names of clients who have more than one beneficiary registered but do not have any scheduled payments with the status 'En Proceso'.", "evidence_supported": "Which clients have multiple registered beneficiaries but no scheduled payments currently in progress?, evidence: 'En Proceso' translates...
["beneficiarios_cliente", "cliente", "cliente_referido_detalle", "contacto_emergencia", "prestamos_concesionados", "prestamos_pagos_programados"]
6
[["Nieves", "Aiza"], ["Michel", "Puerta"], ["D'cruz", "Vela"], ["Chavez", "Torres"], ["Mendoza", "Rivera"]]
schema_015343_s1_q6_8928ad4ad1
schema_015343
SELECT service_name, description, ROW_NUMBER() OVER (ORDER BY LENGTH(description) DESC) as rank FROM grooming_services
hard
{ "verbose": "To help clients compare the level of detail provided for each service, please rank all grooming services by the length of their description in descending order, returning the service name, the full description, and a rank column indicating their position.", "evidence_supported": "List all grooming ser...
["grooming_services"]
1
[["Odor Neutralizing Enzyme Wash", "Enzymatic cleaner specifically targeting organic odor sources like vomit or accidents, breaking down molecules rather than masking.", 1], ["Show Prep Groom", "Intensive grooming session preparing a pet for conformation shows, including precise trimming, coating, and presentation.", 2...
schema_021764_s2_q0_2353509dac
schema_021764
SELECT ASSESSMENT_NAME, ASSESSMENT_RESULT, ASSESSMENT_DEDUCTION FROM AM_ASSESSMENT_RECORD WHERE DELETE_FLAG = '0' AND CREATE_PERSON = 'Montague';
simple
{ "verbose": "Retrieve the assessment name, the result, and the deduction amount for all quality assessments that are currently active (not deleted) and were created by the user 'Montague'.", "evidence_supported": "What are the assessment names, results, and deduction amounts for active quality assessments created ...
["AM_ASSESSMENT_RECORD", "DICT_INFO", "DICT_ITEM", "ERS_REPORT_RECORD", "LAB_EXTRACT_INFO", "LAB_PCR_INFO", "LAB_SY_INFO", "LAB_SY_SAMPLE", "LAB_TASK_INFO", "LOA_PERMISSION", "LOA_PERMISSION_RELATION", "LOA_ROLE", "LOA_ROLE_RELATION", "LOA_USER_INFO", "MATCH_CASE_RESULT", "ORG_INFO"]
16
[["Data Privacy Governance Audit - 221", "Needs Improvement", "7.4"]]
schema_021764_s1_q1_2e012d6010
schema_021764
SELECT u.USER_ID, u.LOGIN_NAME, u.USER_TYPE, u.USER_LEVEL, r.ROLE_ID, r.ROLE_NAME, r.ROLE_LEVEL, p.PERMISSION_ID, p.PERMISSION_NAME, p.PERMISSION_LINK FROM LOA_USER_INFO u JOIN LOA_ROLE_RELATION ur ON u.USER_ID = ur.USER_ID JOIN LOA_ROLE r ON ur.ROLE_ID = r.ROLE_ID JOIN LOA_PERM...
moderate
{ "verbose": "This database supports an enterprise Office Automation (OA) system, specifically managing the complex hierarchy of organizational units, assigning user accounts to professional roles, and defining granular access permissions for business processes like HR leave applications and BPM workflows.", "evide...
["LOA_PERMISSION", "LOA_PERMISSION_RELATION", "LOA_ROLE", "LOA_ROLE_RELATION", "LOA_USER_INFO", "ORG_INFO"]
6
[["USR_00001", "loudon.crocker", "ADMIN", "L1-JUNIOR", "ROLE_0076", "Executive Assistant", "Admin", "PERM_0095", "Ticket System - Export", "/ticket/list/export"], ["USR_00001", "loudon.crocker", "ADMIN", "L1-JUNIOR", "ROLE_0016", "Expense Claim Verifier", "Admin", "PERM_0020", "File Upload/Download - Read", "/file/uplo...
schema_007668_s2_q0_5c18642ce6
schema_007668
SELECT first_name, last_name, email FROM public_customer WHERE id = 39 AND deleted = 0;
simple
{ "verbose": "Find the full name and email address of the customer with ID 39, ensuring that only active (non-deleted) customers are included in the results.", "evidence_supported": "What are the full name and email address of the customer with ID 39, provided they are an active customer?, evidence: Active customer...
["public_customer", "public_customer_commercial_order_history", "public_loyalty_reward_history", "public_order"]
4
[["Prime", "Rowe", "prime.rowe@example.com"]]
schema_017615_s3_q7_82e4bb4896
schema_017615
SELECT n.id, n.color, n.description, n.weight FROM node_relations_history h JOIN nodes n ON n.id = h.node_id1 WHERE h.relation_type = 'sensor_fusion_group' AND h.action = 'calibration_verified' UNION SELECT n.id, n.color, n.description, n.weight FROM node_relations_history h JOIN nodes n ON n.id = h.node_id2 WHERE h....
hard
{ "verbose": "Determine which sensor nodes have had a 'calibration_verified' action recorded in the node_relations_history table for a 'sensor_fusion_group' relation, joining the history table with the nodes table to provide the node details, ensuring we only get nodes that have successfully completed this specific c...
["asynchronous_task_results", "edges", "node_access_logs", "node_audit_actions", "node_cache_entries", "node_changes", "node_connection_settings", "node_export_records", "node_failures", "node_notifications", "node_relations", "node_relations_history", "node_search_index", "node_statistical_snapshots", "nodes", "user_a...
16
[[43, 16711680, "I2C EnviroPHat device deployed at Lab Bench Testbed. Capable of measuring light level, pressure, and multi-axis orientation.-ID-0043", 5.113638980770306], [61, 65280, "Gateway node situated at Server Room Rack A aggregating data from multiple peripheral sensors using Rust-based ratfist-server protocol....
schema_006723_s2_q4_82d9cd5d1e
schema_006723
SELECT g.TITLE, COUNT(r.REGISTRATION_ID) AS registration_count FROM SAKAI_SITE_GROUP g JOIN SAKAI_SITE_GROUPS_CALENDAR_ENTRIES c ON g.GROUP_ID = c.GROUP_ID JOIN SAKAI_SITE_GROUPS_EVENT_REGISTRATIONS r ON c.CALENDAR_ID = r.EVENT_ID WHERE c.START_DATE > '2023-06-01' GROUP BY g.GROUP_ID, g.TITLE ORDER BY g.TITLE
moderate
{ "verbose": "Find the titles of all groups that have scheduled events starting after June 1, 2023, and include the count of how many users have registered for events within each of these groups.", "evidence_supported": "List group titles with events starting after June 1, 2023, and the count of users registered fo...
["SAKAI_SITE_GROUP", "SAKAI_SITE_GROUPS_CALENDAR_ENTRIES", "SAKAI_SITE_GROUPS_EVENT_REGISTRATIONS"]
3
[["Advisory Committee for Engineering", 45], ["Collaboration Space for Newby", 195], ["Collaboration Space for Pritchard", 3], ["Course Section A - Group A", 1], ["Course Section C - Group C", 1], ["Course Section C - Group C", 4], ["Course Section C - Group C", 14], ["LTI Tool Integration Test Group", 1], ["LTI Tool I...
schema_000876_s0_q0_f3e3b7dc39
schema_000876
SELECT product_name, category FROM public_products WHERE product_name = 'Eco Pack Mini';
simple
{ "verbose": "Retrieve the product name and category for the product named 'Eco Pack Mini' to understand its basic details.", "evidence_supported": "What are the name and category of the product called 'Eco Pack Mini'?, evidence: 'Eco Pack Mini' is the exact product name. Category refers to the product group classi...
["public_demand_forecast_accuracy", "public_order_items", "public_orders", "public_product_reviews", "public_products"]
5
[["Eco Pack Mini", "Home & Garden"]]
schema_020049_s0_q4_c38044d5cb
schema_020049
SELECT p.departmentId, SUM(CAST(REPLACE(REPLACE(p.budget, '$', ''), ',', '') AS REAL)) AS total_budget FROM projects p JOIN employees e ON p.managerId = e.employeeId WHERE e.hireDate > '2020-07-01' GROUP BY p.departmentId ORDER BY p.departmentId
moderate
{ "verbose": "Calculate the total budget allocated to all projects managed by employees who were hired after July 1, 2020, and group the results by the department in which those projects are located.", "evidence_supported": "What is the total budget for projects in each department, considering only projects managed...
["employees", "projects", "training_records"]
3
[["DEPT-001", 656580.04], ["DEPT-002", 625784.63], ["DEPT-003", 722145.62], ["DEPT-004", 731829.36], ["DEPT-005", 790058.0800000001]]
schema_007376_s0_q4_e6ee4c961c
schema_007376
SELECT u.username, COUNT(n.id) AS notification_count FROM users u INNER JOIN notifications n ON u.id = n.user_id GROUP BY u.id, u.username ORDER BY notification_count DESC
moderate
{ "verbose": "Find the usernames of all users who have created at least one notification, along with the total count of notifications they have generated.", "evidence_supported": "Which users have generated at least one notification, and what is the total number of notifications each has created?, evidence: Generat...
["component_menu_languages", "component_menus", "correspondence_schedules", "data_retention_records", "notifications", "sessions", "system_event_log_role_actions", "task_checkpoint", "task_schedules", "task_stage_logs", "translation_strings", "user_tag_permissions", "user_template_access", "users"]
14
[["edlerfell344", 2], ["flackcalveley987", 2], ["whittingtondanby616", 2], ["alpinspears247", 2], ["curleypritchard68", 2], ["kilbeeenticott756", 2], ["catoneskins329", 2], ["abrahamsaitchison569", 2], ["nettletongillam772", 2], ["richeshopkins652", 2], ["kearsleyspinks654", 2], ["boultonmcelroy295", 2], ["fentonmcphai...
schema_017989_s1_q1_5bac0ddf26
schema_017989
SELECT name, stars FROM tm_product WHERE id = 1
simple
{ "verbose": "Find the name and star rating of the product with ID 1 to verify its current market perception and display information on the storefront.", "evidence_supported": "What are the name and star rating for product ID 1 to confirm its current market perception and storefront display details?, evidence: Prod...
["tm_customer", "tm_product", "tm_wishlist"]
3
[["Elegant Tencel Throw Pillow", 4]]
schema_006723_s3_q5_f39c8f9076
schema_006723
WITH qualifying_groups AS ( SELECT DISTINCT sa.GROUP_ID FROM SAKAI_SITE_GROUPS_SECURITY_AUDIT sa INNER JOIN SAKAI_SITE_GROUPS_SECURITY_AUDIT_ATTRIBUTES saa ON sa.AUDIT_ID = saa.AUDIT_ID WHERE sa.SUCCESS_STATUS = 1 AND saa.ATTRIBUTE_NAME = 'access_control_scope' ) SELECT qg.GROUP_ID, COUNT(sa.AUDIT...
moderate
{ "verbose": "List the group IDs and the count of successful audit actions for each group, but only include groups where at least one of the successful audit actions has an associated attribute with the name 'access_control_scope', allowing us to identify groups with specific scope configurations that have been activ...
["SAKAI_SITE_GROUP", "SAKAI_SITE_GROUPS_SECURITY_AUDIT", "SAKAI_SITE_GROUPS_SECURITY_AUDIT_ATTRIBUTES"]
3
[["group-0003", 1], ["group-0008", 1], ["group-0015", 1], ["group-0018", 1], ["group-0023", 1], ["group-0024", 1], ["group-0028", 1], ["group-0030", 1], ["group-0034", 1], ["group-0038", 1], ["group-0040", 1], ["group-0044", 1], ["group-0047", 1]]
schema_018076_s3_q3_2565f674ad
schema_018076
SELECT * FROM GS_GADGET WHERE GADGET_GROUP = 'Customer Support'
moderate
{ "verbose": "*These questions involve basic SELECT statements, single table filtering, or simple aggregation without complex joins.*", "evidence_supported": "Retrieve the complete list of deployed gadgets along with their current operational status and last modification timestamp., evidence: Operational status ref...
["GS_GADGET", "GS_GADGET_ACCESS_GRANT_LOG", "GS_GADGET_AUDIT_ANNOTATIONS", "GS_GADGET_DATA_EXPORT_LOG", "GS_GADGET_HISTORY", "GS_GADGET_SPONSORSHIP", "GS_GADGET_USAGE_LOG", "GS_GADGET_USAGE_STATS", "GS_USER"]
9
[[1, "Stoddart", "stoddart@gadgetserver.com", "A secure enterprise gadget leveraging Apache Shindig for seamless integration with SAML-based authentication systems. - Instance ID: 001. Optimized for performance and scalability in high-traffic enterprise environments.", "Customer Support", "https://cdn.gadget-server.ent...
schema_015343_s3_q3_6c897766f5
schema_015343
SELECT p.id AS pet_id, p.name, SUM(pfc.amount_consumed) AS total_wet_canned_food, GROUP_CONCAT(DISTINCT phc.findings) AS health_findings FROM pets p JOIN pet_food_consumption pfc ON p.id = pfc.pet_id LEFT JOIN pet_health_checkups phc ON p.id = phc.pet_id WHERE p.has_microchip = 1 AND pfc.food_type ...
moderate
{ "verbose": "Calculate the total amount of wet canned food consumed (in total volume) by all pets that have a microchip, and join this with their health checkup notes to see if there are any recorded findings for these specific animals, helping us correlate diet with health status for chip-identified pets.", "evid...
["pet_dental_records", "pet_food_consumption", "pet_grooming_sessions", "pet_health_checkups", "pet_race_info", "pets"]
6
[["17", "Raine", 155.7, "respiratory distress mild, oxygen therapy considered. emergency contact information updated in file"], ["23", "Eden", 105.0, "lumps under skin, biopsy scheduled for next week. emergency contact information updated in file"], ["3", "Patten", 74.2, "senior pet assessment, organ function tests adv...
schema_005691_s2_q3_eabdd19edd
schema_005691
SELECT user_id, COUNT(*) AS registration_count FROM permission_logs WHERE action = 'DEVICE_REGISTER' GROUP BY user_id ORDER BY registration_count DESC;
moderate
{ "verbose": "List all unique user IDs who have performed a 'DEVICE_REGISTER' action, along with the count of how many times each user has registered a device, sorted by the number of registrations in descending order.", "evidence_supported": "Which users registered devices, and how many times did each register, so...
["permission_logs"]
1
[[34, 1], [28, 1], [21, 1], [8, 1], [3, 1]]
schema_005537_s2_q6_d0fb736403
schema_005537
SELECT ad.AccountId, ad.DiseaseName, id.ProviderName, inp.Specialty FROM AccountDiseases ad JOIN InsuranceDetails id ON ad.AccountId = id.AccountId JOIN InsuranceNetworkProviders inp ON id.Id = inp.InsuranceDetailId WHERE id.ExpirationDate > date('now') AND inp.Specialty IN ('Orthopedics', 'Pulmonolo...
hard
{ "verbose": "For each patient with a disease diagnosis, retrieve their AccountId, the disease name, the insurance provider name, and the specialty of the in-network provider, but only include those records where the insurance policy expiration date is in the future and the provider specialty is either 'Orthopedics' ...
["AccountDiseases", "InsuranceDetails", "InsuranceNetworkProviders"]
3
[[38, "Asthma", "Humana Group #388", "Orthopedics"], [30, "Psoriasis", "Kaiser Health #634", "Orthopedics"], [10, "Major Depressive Disorder", "Aetna Alliance Co #485", "Pulmonology"], [20, "Multiple Sclerosis", "Aetna Network #830", "Pulmonology"]]
schema_005691_s1_q4_a4fe560ea2
schema_005691
SELECT maintenance_task, next_run_time FROM maintenance_schedules WHERE status = 'Pending Execution';
moderate
{ "verbose": "Retrieve the maintenance task name and its next scheduled run time for any maintenance schedule that is currently in 'Pending Execution' status, ensuring we know what system checks are awaiting approval.", "evidence_supported": "What are the names and next scheduled run times for maintenance tasks cur...
["maintenance_schedules", "user_payment_methods", "user_profile", "user_sessions"]
4
[["NFT Metadata Index Rebuild", 1680228338], ["SSL Certificate Renewal", 1706310833], ["Derivatives Position Margin Review", 1676427331], ["Trading Bot Strategy Validation", 1727338378], ["NFT Metadata Index Rebuild", 1688730516], ["Database Index Optimization", 1764251939], ["Hot Wallet Threshold Adjustment", 17279525...
schema_011349_s1_q1_c72d4779ae
schema_011349
SELECT document_type FROM mf_tracker_funddocument WHERE mf_id = 72
simple
{ "verbose": "List the document type for the document associated with the mutual fund identified by the ID 72.", "evidence_supported": "What document type is associated with the mutual fund having ID 72?, evidence: Document type refers to the classification label in the document metadata.", "structured": "1. Loca...
["mf_tracker_funddocument"]
1
[["Annual Report"]]
schema_000876_s1_q4_a48c42acba
schema_000876
WITH coupon_users AS ( SELECT DISTINCT customer_id FROM public_coupon_usage_logs ), ranked_addresses AS ( SELECT cav.customer_id, cav.address_data, cav.address_type, cav.create_at, ROW_NUMBER() OVER (PARTITION BY cav.customer_id ORDER BY cav.create_at DESC) as rn ...
moderate
{ "verbose": "Find the most recent current address (both data and type) for any customer who has ever used a coupon, joining the usage logs to the address versions to ensure we get the latest active record for those specific users.", "evidence_supported": "What is the latest active address and its type for any cust...
["public_coupon_usage_logs", "public_customer_address_versions", "public_customers"]
3
[[2, "7918 Cedar Ln, Phoenix, AZ 77278", "shipping", "2022-03-20 07:29:51"], [3, "402 Pine Way, Los Angeles, CA 34045 Apt 387", "residential", "2022-11-24 16:12:25"], [7, "6368 Cherry Blossom Pl, Houston, TX 28305", "residential", "2023-07-15 03:43:20"], [9, "4372 Oak Ave, Phoenix, AZ 86329", "work", "2023-11-26 21:54:...
schema_017615_s0_q1_a0c7f4a5ef
schema_017615
SELECT action, timestamp FROM edge_logs WHERE edge_node1 = 53 AND edge_node2 = 14 ORDER BY timestamp DESC LIMIT 1;
simple
{ "verbose": "Find the most recent log action recorded for the connection between node 53 and node 14 to determine if the system is currently healthy or experiencing sync issues.", "evidence_supported": "What is the most recent log action for the connection between node 53 and node 14?, evidence: Node IDs are integ...
["edge_cache_entries", "edge_comments", "edge_imports", "edge_logs", "edge_owners", "edge_permissions", "edge_resource_limits", "edge_resource_usage", "edges", "user_activity_subscriptions"]
10
[["HEARTBEAT", "2022-10-17 10:09:22"]]
schema_004095_s2_q0_784a63768a
schema_004095
SELECT DISTINCT employee_id FROM default_salary_project_assignments WHERE project_name = 'Xi System 36' ORDER BY employee_id
simple
{ "verbose": "List the unique employee IDs who have ever been assigned to the project named 'Xi System 36', ensuring the list is distinct and sorted alphabetically.", "evidence_supported": "Which distinct employee IDs were assigned to the 'Xi System 36' project, sorted alphabetically?, evidence: Xi System 36 is a s...
["default_salary_project_assignments", "default_salary_shifts"]
2
[["E0036"]]
schema_011385_s3_q5_70d668a5b5
schema_011385
SELECT DISTINCT v.name FROM ImageFeedback IF JOIN VenueImage VI ON IF.imageID = VI.imageID JOIN venue v ON VI.venueID = v.venueID WHERE IF.feedbackType = 'Bug Report';
moderate
{ "verbose": "Find the names of venues that have received at least one \"Bug Report\" in their image feedback, joining the feedback messages to the specific venue images to identify which locations are experiencing technical issues.", "evidence_supported": "Which venues have received at least one bug report in thei...
["ImageFeedback", "VenueImage", "VenueRecommendation", "user", "venue"]
5
[["Urban Pub 24"], ["The Lounge 41"], ["Crystal Den 89"], ["Golden House 280"], ["Velvet Spot 38"], ["Grand Club 82"], ["Neon Stage 27"], ["Neon Stage 47"], ["Grand Club 12"], ["Urban Pub 34"], ["Sky Bar 23"], ["Neon Stage 17"], ["Velvet Spot 158"], ["Hidden Hall 16"], ["Golden House 30"], ["Urban Pub 194"], ["Neon Sta...
schema_007376_s2_q6_3500c97e02
schema_007376
WITH spanish_users AS ( SELECT DISTINCT created_by AS user_id FROM translation_strings WHERE language_code = 'es' ), user_action_counts AS ( SELECT su.user_id, u.username, COUNT(serla.log_id) AS action_count FROM spanish_users su JOIN users u ON u.id = su.user_id LEF...
hard
{ "verbose": "Using a CTE, calculate the average number of system event log actions per user for those users who have created at least one translation string in Spanish ('es'), and then return the usernames of users whose total action count exceeds this average.", "evidence_supported": "Which users with Spanish tra...
["config_parameters", "system_event_log_role_actions", "translation_strings", "users"]
4
[["fentonmcphail96"], ["lawrencehealey755"], ["storeyrooney664"], ["pookewilson140"]]
schema_018292_s2_q2_2e2fbefd89
schema_018292
SELECT DISTINCT he.holiday_id, rp.permission FROM holiday_exceptions he CROSS JOIN role_permissions rp WHERE he.user_id = 'attwoodanderton65' AND rp.role_name = 'developer'
simple
{ "verbose": "To cross-reference specific holiday codes with system permissions, please list the holiday_id from any exception involving user 'attwoodanderton65' and the permission text for any role entry where the role_name is 'developer'.", "evidence_supported": "List the holiday IDs associated with user 'attwood...
["holiday_exceptions", "role_permissions"]
2
[[22, "write_widgets"], [22, "static_text_management"]]
schema_004362_s0_q4_5a4faedd7b
schema_004362
SELECT jwa.worker_id, COUNT(DISTINCT jwa.job_id) AS distinct_job_count FROM job_worker_assignment jwa INNER JOIN job_alert ja ON jwa.job_id = ja.job_id INNER JOIN batch_job bj ON jwa.job_id = bj.id INNER JOIN test_table tt ON bj.test_table_id = tt.id GROUP BY jwa.worker_id ORDER BY jwa.worker_id
moderate
{ "verbose": "List the worker IDs along with the number of distinct jobs they have been assigned to, but only for workers who have worked on jobs that generated at least one alert, ensuring the jobs are associated with existing test cases.", "evidence_supported": "Which workers have been assigned to at least one jo...
["batch_job", "job_alert", "job_worker_assignment", "test_table"]
4
[["agent-1012", 1], ["agent-1013", 1], ["agent-1025", 1], ["agent-1167", 1], ["agent-1182", 1], ["agent-1186", 1], ["agent-1411", 1], ["agent-1452", 1], ["agent-1619", 1], ["agent-2042", 1], ["agent-2088", 1], ["agent-2360", 1], ["agent-2635", 1], ["agent-2797", 1], ["agent-2888", 1], ["agent-3081", 1], ["agent-3224", ...
schema_000876_s0_q1_d3e17df5bf
schema_000876
SELECT COUNT(*) AS total_delivered_orders FROM public_orders WHERE status = 'delivered';
simple
{ "verbose": "Find the total number of orders that have a status of 'delivered' to assess our fulfillment success rate.", "evidence_supported": "How many orders are currently marked as delivered? I need this count to evaluate our overall fulfillment success rate against total orders., evidence: Status 'delivered' i...
["public_demand_forecast_accuracy", "public_order_items", "public_orders", "public_product_reviews", "public_products"]
5
[[5]]
schema_005537_s2_q3_d854e644bb
schema_005537
SELECT DISTINCT ad.DiseaseName, ad.DiagnosisDate FROM AccountDiseases ad INNER JOIN InsuranceDetails id ON ad.AccountId = id.AccountId WHERE id.ProviderName = 'Centene Alliance Inc #418' ORDER BY ad.DiseaseName, ad.DiagnosisDate;
moderate
{ "verbose": "Identify all disease names diagnosed for patients who have an insurance policy with 'Centene Alliance Inc #418' as the provider, including the diagnosis date for each condition.", "evidence_supported": "List all diseases diagnosed for patients covered by Centene Alliance Inc #418, including the specif...
["AccountDiseases", "InsuranceDetails", "InsuranceNetworkProviders"]
3
[["Bronchitis", "2022-05-23"], ["Generalized Anxiety Disorder", "2020-09-26"], ["Parkinson's Disease", "2023-12-16"], ["Peripheral Neuropathy", "2022-07-12"], ["Tension-Type Headache", "2020-07-16"]]
schema_005268_s3_q2_01d3f4f4cb
schema_005268
SELECT message, triggerat FROM Reminder WHERE id = 10
simple
{ "verbose": "Show the message and the exact time it was triggered for the reminder with ID 10.", "evidence_supported": "What is the message and exact trigger time for reminder ID 10?, evidence: Reminder ID 10 is a specific scheduled notification. Trigger time is the precise moment the reminder was activated.", "...
["Document", "ProjectTemplate", "ProjectTemplateTask", "Reminder"]
4
[["Unlock table after update on product_catalog view as part of routine maintenance", "2022-03-21 20:07:05"]]
schema_010065_s2_q7_c56e6c2344
schema_010065
SELECT e.title, t.category, COUNT(ex.edocument_x_uuid) as ref_count FROM edocument e JOIN type_def t ON e.doc_type_uuid = t.type_def_uuid LEFT JOIN edocument_x ex ON e.edocument_uuid = ex.ref_edocument_uuid WHERE e.mod_date > e.add_date GROUP BY e.edocument_uuid, e.title, t.category ORDER BY e.title
hard
{ "verbose": "Find the titles of documents that have been modified more recently than their original addition date, and for each, provide the category of their document type and the count of other documents that reference them in the edocument_x table.", "evidence_supported": "Which documents were modified after th...
["edocument", "edocument_x", "type_def"]
3
[["Access Token Refresh Mechanism (Ref: Macfarlane)", "DocumentType", 0], ["Access Token Refresh Mechanism (Ref: Opayne)", "UDFCategory", 0], ["Access Token Refresh Mechanism (Ref: Rashid)", "UDFCategory", 0], ["Access Token Refresh Mechanism (Ref: Smullen)", "ContactRole", 0], ["Access Token Refresh Mechanism (Ref: Wi...
schema_012599_s1_q1_cda9d3a0bc
schema_012599
SELECT COUNT(*) FROM pasystem_banner_budget_spillover WHERE spillover_date = 1667111655
simple
{ "verbose": "Retrieve the total number of budget spillover records that occurred on the specific date represented by the timestamp 1667111655.", "evidence_supported": "How many budget spillover records were created at the exact moment represented by the Unix timestamp 1667111655?, evidence: Budget spillover refers...
["pasystem_banner_alert", "pasystem_banner_budget_spillover", "pasystem_banner_user_feedback", "pasystem_banner_user_journey_steps"]
4
[[1]]
schema_020541_s0_q2_116d81da79
schema_020541
SELECT ERROR_MESSAGE, VALIDATION_RULE FROM VALIDATION_FAILURES_LOG WHERE MANUALLY_CORRECTED = 'N';
simple
{ "verbose": "List the error messages and the specific validation rules that failed for data sets where the failure was not manually corrected, filtering the validation failures log for entries where 'MANUALLY_CORRECTED' is 'N'.", "evidence_supported": "Which validation rules failed on datasets that were not manual...
["PERSONS", "URI_TYPES", "VALIDATION_FAILURES_LOG"]
3
[["File checksum mismatch for raw data file 'data_run_19.csv'. Expected MD5: a1b2c3d4e5f6.", "SCHEMA_VERSION_MISMATCH"], ["Field 'assay_type' failed controlled vocabulary check against NCBI BioAssay ontology.", "DUPLICATE_SAMPLE_ID"], ["Duplicate primary key detected for data record REC-490294 within dataset DS-00017."...
schema_011349_s1_q0_a6c2c367ce
schema_011349
SELECT url FROM mf_tracker_funddocument WHERE mf_id = 68 AND document_type = 'N-PORT'
simple
{ "verbose": "Retrieve the specific URL for the N-PORT document associated with the mutual fund identified by the ID 68.", "evidence_supported": "What is the URL for the N-PORT document for the mutual fund with ID 68?, evidence: N-PORT refers to the portfolio holdings report filed by mutual funds.", "structured":...
["mf_tracker_funddocument"]
1
[["https://docs.mutualfundtracker.com/funds/68/n-port/N-PORT_31.pdf"]]
schema_005268_s3_q7_3d930e501e
schema_005268
SELECT DISTINCT d.owner FROM Document d INTERSECT SELECT DISTINCT pt.owner FROM ProjectTemplate pt JOIN ProjectTemplateTask ptt ON pt.id = ptt.projecttemplateid WHERE ptt.taskstatus = 4
hard
{ "verbose": "Find the user IDs of owners who have both created a document and own a project template that contains at least one task with a status of 4, ensuring the query verifies the existence of both document ownership and template-task associations for the same user.", "evidence_supported": "Which users own bo...
["Document", "ProjectTemplate", "ProjectTemplateTask", "Reminder"]
4
[[1]]
schema_014825_s3_q5_a8a2247a60
schema_014825
SELECT e.id_reporte, e.mensaje_error, c.cuenta_destinatario AS username FROM appausadbmovil_reporte_error_detalle e INNER JOIN appausadbmovil_reporte_compartido c ON e.id_reporte = c.id_reporte
moderate
{ "verbose": "I need to find all reports that have both an error log and a shared user. Please list the report ID, the error message, and the username of the shared recipient.", "evidence_supported": "List the report ID, error message, and shared recipient username for all reports that contain an error log and have...
["appausadbmovil_historial_reporte", "appausadbmovil_reporte", "appausadbmovil_reporte_asignado", "appausadbmovil_reporte_compartido", "appausadbmovil_reporte_dependencia", "appausadbmovil_reporte_error_detalle", "appausadbmovil_reporte_geo", "appausadbmovil_reporte_notificacion", "appausamovil_reporte_documento"]
9
[["RPT-1020", "RuntimeError: Unhandled exception in background worker thread", "USER-0016"], ["RPT-1020", "RuntimeError: Unhandled exception in background worker thread", "USER-0028"], ["RPT-1031", "Out of memory exception during image processing task", "USER-0033"], ["RPT-1008", "KeyError: Missing required field 'user...
schema_000876_s1_q6_1d42636615
schema_000876
WITH ranked_addresses AS ( SELECT customer_id, address_type, ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY create_at DESC) as rn FROM public_customer_address_versions ), current_addresses AS ( SELECT customer_id, address_type FROM ranked_addresses WHERE rn = 1 AND add...
hard
{ "verbose": "For each customer, determine if their current address type is 'billing' and whether they have used any coupons; return the customer's name, current address type, and a count of coupon usages, but only for those who have at least one coupon usage and a billing address, utilizing window functions to rank ...
["public_coupon_usage_logs", "public_customer_address_versions", "public_customers"]
3
[["Jenkinson", "Goodwin", "billing", 16], ["Stokes", "Cowley", "billing", 3], ["Snowdon", "Jepson", "billing", 5], ["Finan", "Kidd", "billing", 25], ["Lyon", "Albert", "billing", 10], ["Eyles", "Karras", "billing", 1], ["Cavanagh", "Twiggs", "billing", 6], ["Gandham", "Totten", "billing", 6]]
schema_012060_s1_q5_ea92a746ed
schema_012060
SELECT L.numero AS license_number, L.validade AS validity_date FROM Licencas L JOIN Estabelecimentos E ON L.idEstabelecimento = E.idEstabelecimento WHERE E.idBairro = 'Bairro_0022';
moderate
{ "verbose": "Retrieve the license number and validity date for all licenses issued to establishments located in the neighborhood with ID 'Bairro_0022', to ensure regulatory compliance for businesses in that specific area.", "evidence_supported": "What are the license numbers and validity dates for all establishmen...
["Equipamentos", "Estabelecimentos", "Licencas", "Veiculos"]
4
[["2024-01-0025", "1.79769313486232e+308"], ["2024-06-0030", "2024-06-02"]]
schema_020541_s3_q2_f87a0bdb27
schema_020541
SELECT NAME, SCRIPT_TYPE FROM scripts WHERE IS_AVAILABLE = 'TRUE' AND PERS_ID_REGISTERER = 'PERS-WINWARD';
simple
{ "verbose": "List the name and script type of the script that is currently available and registered by the person with ID 'PERS-WINWARD'.", "evidence_supported": "Which script, currently active and registered by user PERS-WINWARD, is available, and what is its name and script type?, evidence: Script type is a cate...
["DATA_MIGRATION_PROGRESS", "DATA_SET_TYPES", "DATA_SET_TYPE_PROPERTY_TYPES", "DATA_STORES", "DATA_STORE_SERVICES", "DATA_STORE_SERVICE_DATA_SET_TYPES", "MATERIAL_TYPE_PROPERTY_TYPES", "SAMPLE_TYPES", "SCRIPT_VERSIONS", "scripts"]
10
[["export_results_csv", "IMPORT_EXPORT"]]
schema_018459_s2_q2_9e2b6975f5
schema_018459
SELECT city, state FROM leads WHERE id = 'LEAD-00012'
simple
{ "verbose": "Find the city and state for the lead with ID 'LEAD-00012' to determine the geographic region for regional targeting analysis.", "evidence_supported": "What city and state are associated with lead ID 'LEAD-00012' for regional targeting analysis?, evidence: Lead ID 'LEAD-00012' refers to a specific pros...
["call_logs", "lead_sources", "leads", "note_history"]
4
[["Dallas", "TX"]]
schema_017989_s0_q5_a6eabaaaeb
schema_017989
SELECT ul.username FROM tm_purchase_order po JOIN user_login ul ON po.created_by = ul.user_id JOIN tm_security_logs sl ON ul.user_id = sl.user_id WHERE po.order_number = 'PO-211210-0261' AND sl.action_type = 'PROFILE_UPDATE'
moderate
{ "verbose": "*Reasoning*: Requires joining `tm_purchase_order` (filter by order_number) -> `user_login` (get email) -> `tm_user_language_preferences` (existence check) -> `user_login` again (user_type check, though redundant, it forces the join). To strictly use *all* tables, we might add a check against `tm_securit...
["tm_export_logs", "tm_purchase_order", "tm_security_logs", "tm_user_language_preferences", "tr_order_invoices", "tr_purchase_receiving", "user_login"]
7
[["timson897"]]
schema_006723_s1_q1_e4943eb1ac
schema_006723
SELECT DISTINCT GROUP_ID FROM SAKAI_SITE_GROUPS_ANNOUNCEMENT_READ_STATUS WHERE ANNOUNCEMENT_ID = 1
simple
{ "verbose": "List the unique group identifiers that are associated with announcement ID 1 in the tracking records.", "evidence_supported": "What are the distinct group identifiers found in the tracking records for announcement ID 1?, evidence: Announcement ID 1 refers to the specific announcement. Tracking records...
["SAKAI_SITE_GROUPS_ANNOUNCEMENT_READ_STATUS"]
1
[["group-0045"], ["group-0009"], ["group-0003"], ["group-0053"], ["group-0006"], ["group-0007"], ["group-0013"], ["group-0008"], ["group-0001"], ["group-0010"], ["group-0040"], ["group-0002"], ["group-0004"], ["group-0005"], ["group-0018"], ["group-0049"], ["group-0044"]]
schema_005268_s0_q7_f3624542c4
schema_005268
SELECT p.name FROM Project p JOIN Milestone m ON p.id = m.projectid GROUP BY p.id, p.name HAVING SUM(CASE WHEN m.completed = 1 THEN 1 ELSE 0 END) >= 1;
hard
{ "verbose": "Find the names of all projects that have at least one completed milestone, using a join between projects and milestones with a HAVING clause to ensure we only include projects with successful milestone completion, providing visibility into active versus stagnant projects.", "evidence_supported": "Whic...
["DocumentVersion", "Milestone", "Project", "Task", "TaskDependency"]
5
[["Cleanup-Core-1"], ["Schema-API-2"], ["Audit-Auth-3"], ["Refactor-API-4"], ["Database-Auth-5"], ["Migration-CRM-6"], ["Migration-Inventory-7"], ["Migration-Auth-8"], ["Cleanup-Auth-9"], ["Database-Analytics-10"]]
schema_014915_s3_q6_cefa3c9a40
schema_014915
SELECT DISTINCT u.FullName, scr.Notes FROM User u JOIN ServiceReview sr ON u.ID = sr.RevieweeID JOIN ShiftConflictResolution scr ON u.ID = (SELECT s2.AssignedUserID FROM Shift s2 WHERE s2.ID = scr.ShiftID) WHERE sr.Rating >= 4
hard
{ "verbose": "Generate a report that lists the full names of users who have both been reviewed in a \"ServiceReview\" with a rating of 4 or higher AND have also been involved in a \"ShiftConflictResolution\" event, including the notes from the conflict resolution, to identify high-performing employees who have also f...
["AttendanceAlerts", "AttendanceValidation", "ClockInOut", "Department", "ServicePriority", "ServiceReview", "ServiceRoster", "Shift", "ShiftConflictResolution", "User", "shift_capacity"]
11
[["Gates Spinks", "Adjustment made for Bush's shift. Reason: requested personal time off. [Ref: 1]"], ["Hogan Ennis", "Jenkyns requested client meeting extended unexpectedly. Approved by manager. [Ref: 2]"], ["Lucas Armour", "Temporary adjustment for Bell due to transportation issues reported. [Ref: 3]"], ["Gates Spink...
End of preview. Expand in Data Studio

sqale2 queries

Synthetic text-to-SQL corpus: SQLite schemas filled with generated data, natural-language questions at three difficulty levels, and SQL that was executed on the filled data and accepted by an LLM judge. Built from generation tasks 0-240.

The corpus is split in two datasets joined on schema_id: cwolff/sqale2_schemas holds each schema once, cwolff/sqale2_queries holds the questions.

Split schema-disjoint (test_frac=0.05): a test-split schema never appears in train, so a test question can't be answered from a schema the model saw in training.

177,377 questions (169,277 train / 8,100 test), one row each.

column content
question_id stable id
schema_id join key into the schemas dataset
sql the SQL answer (SQLite)
difficulty simple, moderate or hard
questions dict of eight phrasings of the same question (below)
relevant_tables, number_of_relevant_tables tables the SQL uses
execution_result first rows of the SQL's result on the filled data (JSON)

questions keys: verbose (the original, fully specified question), evidence_supported (a short question followed by , evidence: and the domain knowledge needed to answer it), structured, requirements_list, short_ambiguous, short_high_level, casual and spelling_grammar_mistakes. A key is null where that rewrite could not be produced.

from datasets import load_dataset
q = load_dataset("cwolff/sqale2_queries", split="train")
s = load_dataset("cwolff/sqale2_schemas", split="train")
ddl = dict(zip(s["schema_id"], s["full_schema"]))
row = q[0]; print(row["questions"]["verbose"], row["sql"], ddl[row["schema_id"]][:200])
Downloads last month
104