%0 Journal Article %T RYANSQL: Recursively Applying Sketch-based Slot Fillings for Complex Text-to-SQL in Cross-Domain Databases %A Choi, DongHyun %A Shin, Myeong Cheol %A Kim, EungGyun %A Shin, Dong Ryeol %J Computational Linguistics %D 2021 %8 June %V 47 %N 2 %I MIT Press %C Cambridge, MA %F choi-etal-2021-ryansql %X Text-to-SQL is the problem of converting a user question into an SQL query, when the question and database are given. In this article, we present a neural network approach called RYANSQL (Recursively Yielding Annotation Network for SQL) to solve complex Text-to-SQL tasks for cross-domain databases. Statement Position Code (SPC) is defined to transform a nested SQL query into a set of non-nested SELECT statements; a sketch-based slot-filling approach is proposed to synthesize each SELECT statement for its corresponding SPC. Additionally, two input manipulation methods are presented to improve generation performance further. RYANSQL achieved competitive result of 58.2% accuracy on the challenging Spider benchmark. At the time of submission (April 2020), RYANSQL v2, a variant of original RYANSQL, is positioned at 3rd place among all systems and 1st place among the systems not using database content with 60.6% exact matching accuracy. The source code is available at https://github.com/kakaoenterprise/RYANSQL. %R 10.1162/coli_a_00403 %U https://aclanthology.org/2021.cl-2.12 %U https://doi.org/10.1162/coli_a_00403 %P 309-332