EMNLP Findings2021
Natural SQL: Making SQL Easier to Infer from Natural Language Specifications
Yujian Gan, Xinyun Chen, Jinxia Xie, Matthew Purver, John R. Woodward, John H. Drake, Qiaofu Zhang
Abstract
Addressing the mismatch between natural language descriptions and the corresponding SQL queries is a key challenge for text-to-SQL translation. To bridge this gap, we propose an SQL intermediate representation (IR) called Natural SQL (NatSQL). Specifically, NatSQL preserves the core functionalities of SQL, while it simplifies the queries as follows: (1) dispensing with operators and keywords such as GROUP BY, HAVING, FROM, JOIN ON, which are usually hard to find counterparts for in the text descriptions; (2) removing the need for nested subqueries and set operators; and (3) making schema linking easier by reducing the required number of schema items. On Spider, a challenging textto-SQL benchmark that contains complex and nested SQL queries, we demonstrate that Nat-SQL outperforms other IRs, and significantly improves the performance of several previous SOTA models. Furthermore, for existing models that do not support executable SQL generation, NatSQL easily enables them to generate executable SQL queries, and achieves the new state-of-the-art execution accuracy 1 .
Ask Lune
Ask anything. The answer quotes the paper.
Lune reads all of it and the papers around it, then shows you the passages behind every answer.
Lune answers from
the full paper · 23 top-tier papers that cite it · related work
Free to start. No credit card required.
Cited by top-tier papers23
- DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-CorrectionMohammadreza Pourreza, Davood RafieiNeurIPS 2023 · 909 citations
- The Dawn of Natural Language to SQL: Are We Fully Ready? [Experiment, Analysis & Benchmark ]Boyan Li, Yuyu Luo, Chengliang Chai, Guoliang Li et al.VLDB 2024 · 137 citations
- SQL-R1: Training Natural Language to SQL Reasoning Model By Reinforcement LearningPeixian Ma, Xialie Zhuang, Chengjin Xu, Xuhui Jiang et al.NeurIPS 2025 · 94 citations
- CatSQL: Towards Real World Natural Language to SQL ApplicationsHan Fu, Chang Liu, Bin Wu, Feifei Li et al.VLDB 2023 · 79 citations
- RASAT: Integrating Relational Structures into Pretrained Seq2Seq Model for Text-to-SQLJiexing Qi, Jingyao Tang, Ziwei He, Xiangpeng Wan et al.EMNLP 2022 · 73 citations
Builds on4
- Bridging Textual and Tabular Data for Cross-Domain Text-to-SQL Semantic ParsingXi Victoria Lin, Richard Socher, Caiming XiongEMNLP Findings 2020 · 186 citations
- Learning Contextual Representations for Semantic Parsing with Generation-Augmented Pre-TrainingPeng Shi, Patrick Ng, Zhiguo Wang, Henghui Zhu et al.AAAI 2021 · 124 citations
- Grounded Adaptation for Zero-shot Executable Semantic ParsingVictor Zhong, Mike Lewis, Sida I. Wang, Luke ZettlemoyerEMNLP 2020 · 85 citations
- RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL ParsersBailin Wang, Richard Shin, Xiaodong Liu, Oleksandr Polozov et al.ACL 2020 · 39 citations
Related papers
- Importance of Synthesizing High-quality Data for Text-to-SQL ParsingYiqun Hu, Yiyun Zhao, Jiarong Jiang, Wuwei Lan et al.ACL Findings 2023 · 24 citations
- PURPLE: Making a Large Language Model a Better SQL WriterTonghui Ren, Yuankai Fan, Zhenying He, Ren Huang et al.ICDE 2024 · 49 citations
- Re-examining the Role of Schema Linking in Text-to-SQLWenqiang Lei, Weixin Wang, Zhixin Ma, Tian Gan et al.EMNLP 2020 · 71 citations
- SPARQLing Database Queries from Intermediate Question DecompositionsIrina Saparina, Anton OsokinEMNLP 2021 · 11 citations
- QBridge: Bridging Natural Language and SQL via Gold Query Rewriting with Agentic RefinementZhensheng Luo, Sai Wu, Yuan Qiu, Chang Yao et al.ACL 2026
