## 1 Introduction  
Structured Query Language (SQL) has become the standard language for database querying, but its complexity poses a barrier for non-technical users. The Natural Language to Structured Query Language (NL2 SQL) task converts natural language questions into SQL, providing non-specialist users with a way to interact with databases [1]. The NL2 SQL problem can be defined as follows: given a natural language query and a corresponding database table, the NL2 SQL model generates an SQL statement. Early NL2 SQL tasks were primarily based on rule-based or pipeline approaches and used domain-specific, simple datasets, making replication challenging. In recent years, with the release of large-scale annotated datasets and the rapid development of deep learning and natural language processing (NLP) technologies, research in the NL2 SQL field has garnered significant attention. Researchers have proposed a range of new methods, continuously advancing this field. With breakthroughs in NLP due to deep learning, applying these methods to NL2 SQL tasks has yielded positive results [2]. In 2017, Salesforce introduced the large NL2 SQL dataset WikiSQL [3], containing 80,654 query questions and their related SQL statements across 24,241 database tables. Many studies followed, aiming to improve the accuracy of the WikiSQL dataset. The SQL statements in WikiSQL are relatively simple, mainly involving single-table queries. In 2018, Yale University released the Spider dataset [4], a new NL2 SQL dataset presenting a higher difficulty level than WikiSQL. Spider, annotated by 11 Yale students, is a large-scale, complex cross-domain semantic parsing and text-to-SQL dataset. The Spider challenge aims to develop natural language interfaces for cross-domain databases. It contains 10,181 questions and 5693 unique complex SQL queries spanning 200 databases and multiple tables across 138 different domains. In Spider1.0, distinct complex SQL queries and databases appear in both training and testing sets. To perform well on this dataset, systems must generalize effectively to new SQL queries and database schemas. On 28 August 2024, an early-access version of Spider2.0 (a more realistic and challenging text-to-SQL task) became available. Spider2.0 includes 600 real-world text-to-SQL workflow questions derived from enterprise-level database use cases. The databases in Spider 2.0 come from real data applications, often containing over 1000 columns, stored in cloud-based or on-premise database systems like BigQuery, Snowflake, or PostgreSQL. Solving Spider2.0 tasks typically requires understanding and searching through database metadata, dialect documentation, and even project-level codebases. This challenge requires models to interact with complex SQL workflow environments, handle extensive context, perform intricate reasoning, and generate SQL queries with multiple operations, often spanning over 100 lines, far exceeding traditional text-to-SQL challenges. Progress on Spider 2.0 represents a critical step toward developing LLM-based code agents that are more intelligent and autonomous in real enterprise environments. With continuous improvements in datasets and the rapid development of large model technologies, many scholars are using large models to enhance NL2 SQL accuracy. Data management in the financial industry has a history of over a decade. Many enterprises in the financial sector have established their own data platforms, applying data extensively in risk, finance, regulatory, and marketing domains, with data playing an increasingly important role in real business scenarios [5]. As data becomes a production factor, financial enterprises place increasing value on data assets. Reports have traditionally been an important way to demonstrate data's intrinsic value, yet fixed reports are increasingly insufficient for business needs. Business personnel require the ability to explore valuable data from certain datasets to support decision-making directly and wish to convert data insights into business value quickly.