datasets
Training and evaluation data, with the modality, task and licence stated up front. Listed live from the Hugging Face Hub.
sql-create-context
Overview
This dataset builds from WikiSQL and Spider.
There are 78,577 examples of natural language queries, SQL CREATE TABLE statements, and SQL Query answering the question using the CREATE statement as context. This dataset was built with text-to-sql LLMs in mind, intending to prevent hallucination of column and table names often seen when trained on text-to-sql datasets. The CREATE TABLE statement can often be copy and pasted from different DBMS and provides table names, column… See the full description on the dataset page: https://huggingface.co/datasets/b-mc2/sql-create-context.synthetic_text_to_sql
Image generated by DALL-E. See prompt for more details
synthetic_text_to_sql
gretelai/synthetic_text_to_sql is a rich dataset of high quality synthetic Text-to-SQL samples,
designed and generated using Gretel Navigator, and released under Apache 2.0.
Please see our release blogpost for more details.
The dataset includes:
105,851 records partitioned into 100,000 train and 5,851 test records
~23M total tokens, including ~12M SQL tokens
Coverage across 100 distinct… See the full description on the dataset page: https://huggingface.co/datasets/gretelai/synthetic_text_to_sql.SQaLe-text-to-SQL-dataset
🧮 SQALE: A Large-Scale Semi-Synthetic Dataset
SQALE is a large-scale, semi-synthetic Text-to-SQL dataset grounded in real-world database schemas.
It was designed to push the boundaries of natural language to SQL generation, combining realistic schema diversity, complex query structures, and linguistically varied natural language questions.
The dataset was introduced in the paper SQaLe: A Large Text-to-SQL Corpus Grounded in Real Schemas. The code for the generation pipeline of this… See the full description on the dataset page: https://huggingface.co/datasets/trl-lab/SQaLe-text-to-SQL-dataset.gretel-synthetic-text-to-sql
Fork of gretelai/synthetic_text_to_sql
The gretelai/synthetic_text_to_sql dataset is a large, Apache 2.0 licensed, synthetic Text-to-SQL dataset consisting of 105,851 high-quality records across 100 diverse domains, designed for training language models. It includes comprehensive SQL tasks with varying complexities, database contexts, natural language explanations, and contextual tags, outperforming existing datasets in SQL correctness and standards compliance.
spider-text-to-sql
Spider Text-to-SQL with LLM-Judge Labels
This dataset extends Spider 1.0 with SQL predictions from gpt-5.4-mini and two correctness labels per example: a hybrid ground truth label and an LLM judge label from gpt-5.4.
Files
File
Description
spider_dataset.parquet
Full dataset with predictions and labels
scripts/
Reproduction scripts (see below)
Dataset statistics
Source: Spider 1.0 training split (train_spider.json)
Databases: the… See the full description on the dataset page: https://huggingface.co/datasets/Glide-py/spider-text-to-sql.Text-to-sql-v1task076_splash_correcting_sql_mistake
Dataset Card for Natural Instructions (https://github.com/allenai/natural-instructions) Task: task076_splash_correcting_sql_mistake
Additional Information
Citation Information
The following paper introduces the corpus in detail. If you use the corpus in published work, please cite it:
@misc{wang2022supernaturalinstructionsgeneralizationdeclarativeinstructions,
title={Super-NaturalInstructions: Generalization via Declarative Instructions on 1600+ NLP Tasks}… See the full description on the dataset page: https://huggingface.co/datasets/Lots-of-LoRAs/task076_splash_correcting_sql_mistake.Persian-Business-Text-to-SQL-Gold-1K
Persian Business Text-to-SQL Gold-1K
1,000 Persian-native, execution-verified business Text-to-SQL examples for fine-tuning and benchmarking.
مجموعهای ۱۰۰۰ نمونهای برای تبدیل درخواستهای فارسی کسبوکار به SQL، همراه با دیتابیسهای SQLite اجرایی، schema کامل، متادیتای سختی/مهارت و ارزیابی مبتنی بر Execution Accuracy.
Motivation
BIRD emphasizes database-grounded Text-to-SQL and execution accuracy; Spider 2.0 pushes toward realistic enterprise database workflows.… See the full description on the dataset page: https://huggingface.co/datasets/jumplander/Persian-Business-Text-to-SQL-Gold-1K.task077_splash_explanation_to_sql
Dataset Card for Natural Instructions (https://github.com/allenai/natural-instructions) Task: task077_splash_explanation_to_sql
Additional Information
Citation Information
The following paper introduces the corpus in detail. If you use the corpus in published work, please cite it:
@misc{wang2022supernaturalinstructionsgeneralizationdeclarativeinstructions,
title={Super-NaturalInstructions: Generalization via Declarative Instructions on 1600+ NLP Tasks}… See the full description on the dataset page: https://huggingface.co/datasets/Lots-of-LoRAs/task077_splash_explanation_to_sql.text-to-sql-spider-dataset
Text-to-SQL Dataset
A curated dataset for training text-to-SQL models. This dataset contains natural language questions paired with corresponding SQL queries, formatted for instruction fine-tuning.
📊 Dataset Summary
Total Samples: 20000
Format: Chat template (system/user/assistant messages)
Task: Text-to-SQL generation
Language: English
License: apache-2.0
📁 Dataset Structure
Data Format
Each example contains a conversation with three roles:… See the full description on the dataset page: https://huggingface.co/datasets/chrisjcc/text-to-sql-spider-dataset.enterprise-text-to-sql-benchmark
Enterprise Text-to-SQL Benchmark
3,045 natural-language questions paired with executable PostgreSQL, over a
12-table enterprise schema (sales, catalogue, logistics, HR).
Built to answer one question honestly: does fine-tuning actually improve
text-to-SQL? On this benchmark, a QLoRA fine-tune of Qwen3-8B took strict
execution accuracy from 10.82 % to 50.99 % — and the benchmark is designed
so that number cannot be inflated by leakage or by string-matching.
split
rows… See the full description on the dataset page: https://huggingface.co/datasets/hari-krishna-ai/enterprise-text-to-sql-benchmark.task107_splash_question_to_sql
Dataset Card for Natural Instructions (https://github.com/allenai/natural-instructions) Task: task107_splash_question_to_sql
Additional Information
Citation Information
The following paper introduces the corpus in detail. If you use the corpus in published work, please cite it:
@misc{wang2022supernaturalinstructionsgeneralizationdeclarativeinstructions,
title={Super-NaturalInstructions: Generalization via Declarative Instructions on 1600+ NLP Tasks}… See the full description on the dataset page: https://huggingface.co/datasets/Lots-of-LoRAs/task107_splash_question_to_sql.effi-sql-training
Diff-SQL Training Dataset
We release the training datasets used by Diff-SQL for SQL efficiency optimization.
This dataset includes:
Patch Generator Training Dataset: SFT data for generating SQL optimization patches.
Constraint Aligner Training Dataset: SFT warmup data for constraint-aware SQL optimization refinement.
Files
patch-generator-training-dataset/
train.parquet
dev.parquet
constraint-aligner-training-dataset/
train.parquet
dev.parquet… See the full description on the dataset page: https://huggingface.co/datasets/birdsql/effi-sql-training.ACE-SQL
ACE-SQL Training Data
This repository contains the curated supervised fine-tuning (SFT),
reinforcement learning (RL), and empirical-pool data released with
ACE-SQL: Adaptive Co-Optimization via Empirical Credit Assignment for
Text-to-SQL.
ACE-SQL trains a shared language-model policy in two roles: a schema retriever
that selects the minimum required database columns, and a SQL generator that
operates on the resulting pruned schema. The SFT data provides a cold start for
both… See the full description on the dataset page: https://huggingface.co/datasets/xiaobing11/ACE-SQL.SQLFlow
Text2SQL-Flow Dataset Repository
This repository contains the SQLFlow dataset.
The SQLFlow dataset is a large-scale, high-quality collection of semantically valid and structurally diverse Text-to-SQL examples, generated using a comprehensive SQL-aware data augmentation framework.
For more details, please visit the GitHub repository:🔗 https://github.com/TechNomad-ds/Text2SQL-Flow
mirror-sql
MIRROR-SQL
Provenance-Controlled Database Environments for Text-to-SQL Agents.
13 PostgreSQL environments · 176 tables · 2762 columns · 390 annotated question/SQL pairs.
MIRROR-SQL takes the opposite approach to contamination from every other text-to-SQL corpus.
Spider and BIRD sample public databases. BEAVER uses real private warehouses that cannot be
redistributed. LiveSQLBench out-runs leakage temporally by rebuilding from changing sources.
MIRROR-SQL instead purpose-builds… See the full description on the dataset page: https://huggingface.co/datasets/1digitaldesign/mirror-sql.sql-create-context-instruction
Overview
This dataset is built upon SQL Create Context, which in turn was constructed using data from WikiSQL and Spider.
There are 78,577 examples of natural language queries, SQL CREATE TABLE statements, and SQL Query answering the question using the CREATE statement as context. This dataset was built with text-to-SQL LLMs in mind, intending to prevent hallucination of column and table names often seen when trained on text-to-SQL datasets. The CREATE TABLE statement can often be… See the full description on the dataset page: https://huggingface.co/datasets/bugdaryan/sql-create-context-instruction.sql-create-context-pt
Overview
Este dataset é uma versão traduzida para o português do dataset b-mc2/sql-create-context,
que foi construído a partir dos datasets WikiSQL e Spider. Ele contém exemplos de perguntas
em português, instruções SQL CREATE TABLE e consultas SQL que respondem às perguntas
utilizando a instrução CREATE TABLE como contexto.
O principal objetivo deste dataset é ajudar modelos de linguagem natural em português a gerar consultas
SQL precisas e contextualizadas, prevenindo a… See the full description on the dataset page: https://huggingface.co/datasets/emdemor/sql-create-context-pt.sql-create-context-copy
Fork of b-mc2/sql-create-context
Overview
This dataset builds from WikiSQL and Spider.
There are 78,577 examples of natural language queries, SQL CREATE TABLE statements, and SQL Query answering the question using the CREATE statement as context. This dataset was built with text-to-sql LLMs in mind, intending to prevent hallucination of column and table names often seen when trained on text-to-sql datasets. The CREATE TABLE statement can often be copy and pasted from… See the full description on the dataset page: https://huggingface.co/datasets/philschmid/sql-create-context-copy.Effi-SQL
Effi-SQL
Update 2026-06-12
We release Effi-SQL, a dataset suite for SQL efficiency optimization.
This collection includes:
Effi-SQL Benchmark: a benchmark for evaluating SQL efficiency optimization methods.
Diff-SQL Training Dataset: training data used by Diff-SQL, including data for the Patch Generator and Constraint Aligner.
Dataset Fields
Effi-SQL Benchmark
id: A unique identifier for each benchmark instance.
db: The database… See the full description on the dataset page: https://huggingface.co/datasets/birdsql/Effi-SQL.sql-new-copy
Languages:
English
Data Splits
The following is taken from the corpus' source repsository:
enterprise-text-to-sql-verified
Verified Multi-Dialect Enterprise Text-to-SQL Dataset
This dataset contains 100% deterministically verified Text-to-SQL instruction pairs across multiple cloud warehouse dialects (DuckDB, PostgreSQL, Snowflake, BigQuery).
Features
Deterministic Execution: Every query executed and verified in DuckDB memory before ingestion.
Multi-Dialect Translation: Native PostgreSQL, Snowflake, and BigQuery transpiled variants included.
ShareGPT Structured: Formatted for direct… See the full description on the dataset page: https://huggingface.co/datasets/Zeknichov/enterprise-text-to-sql-verified.sql-create-context-id
Overview
This dataset is a fork from sql-create-context
This dataset builds from WikiSQL and Spider.
There are 78,577 examples of natural language queries, SQL CREATE TABLE statements, and SQL Query answering the question using the CREATE statement as context. This dataset was built with text-to-sql LLMs in mind, intending to prevent hallucination of column and table names often seen when trained on text-to-sql datasets. The CREATE TABLE statement can often be copy and pasted from… See the full description on the dataset page: https://huggingface.co/datasets/detakarang/sql-create-context-id.zsql-sqlite-dpo
zsql-sqlite-dpo
This is a dataset for training machine learning models to convert natural
English language text into SQLite dialect SQL queries.
This dataset comprises 200,000 DPO pairs curated to support the rapid
development of text-to-SQL generation models. The uniqueness of this dataset
lies in its optimization process. The "chosen" field within each data pair
contains SQL queries that have been canonicalized, optimized, and which are
chosen from the candidate set which… See the full description on the dataset page: https://huggingface.co/datasets/zerolink/zsql-sqlite-dpo.text-to-sql-phrasing-robustness
Does sloppy phrasing break text-to-SQL?
The enterprise text-to-SQL benchmark
lists its own biggest caveat: every question is template-generated, so real user phrasing is untested.
This is the test. 35 test questions (one per template), each sent to the deployed
pipeline four ways: as written, with a typo, in business shorthand, and stripped to a terse fragment.
24 questions and 85 answers survive the filter described under Setup; every answer was
executed against the database.… See the full description on the dataset page: https://huggingface.co/datasets/hari-krishna-ai/text-to-sql-phrasing-robustness.sql-query-generation-sft-100k
SQL Query Generation SFT (100K)
100,000 ShareGPT conversations demonstrating high-quality SQL query generation from natural language requests. Each example includes a realistic database schema, a natural language query request, a correct SQL query, and a clear explanation of how the query works — across 6 SQL dialects and 15+ complexity levels.
Motivation
Text-to-SQL is one of the highest-value NLP applications in enterprise settings. Common model failures… See the full description on the dataset page: https://huggingface.co/datasets/stindardlogic/sql-query-generation-sft-100k.enterprise-sql-text-to-db-sft-dpo-2026
💎 Enterprise SQL, Text-to-DB & Schema-Aware Query Architect SFT/DPO Dataset (2026)
High-precision instruction tuning and preference optimization dataset with step-by-step Chain-of-Thought (<thought>) reasoning chains for fine-tuning LLMs (Llama-3.3, Qwen-2.5-Coder, DeepSeek-R1-Distill, Mistral, Phi-4) into Senior Enterprise Database Architects.
📊 Dataset Overview
Format: OpenAI ChatML & ShareGPT format with <thought> reasoning tokens.
Dialect Coverage (5… See the full description on the dataset page: https://huggingface.co/datasets/beatsprom/enterprise-sql-text-to-db-sft-dpo-2026.text-to-sql-eval-predictions
What the text-to-SQL models actually generated
Every prediction behind the numbers in
qwen3-8b-text2sql-qlora: the 453 test
questions of the enterprise text-to-SQL benchmark,
each answered by four configurations of the same model, each answer executed against the reference
PostgreSQL database and scored by comparing result sets. 1,812 rows.
I published this because the headline table (10.82 % → 50.99 % → 52.10 %) is the least interesting part of
that project. The interesting… See the full description on the dataset page: https://huggingface.co/datasets/hari-krishna-ai/text-to-sql-eval-predictions.odoo-sql-query-dataset
Odoo SQL Query Dataset
This dataset contains natural language to SQL query pairs specifically for Odoo 17.0 Community Edition. It's designed to help train and fine-tune language models for generating accurate SQL queries for Odoo databases.
Dataset Description
Overview
The dataset consists of 6815 carefully curated examples of natural language questions paired with their corresponding SQL queries for Odoo databases. Each example includes detailed instructions… See the full description on the dataset page: https://huggingface.co/datasets/VPCSinfo/odoo-sql-query-dataset.Text-to-sql-v1
