{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,10,5]],"date-time":"2025-10-05T17:00:37Z","timestamp":1759683637832},"reference-count":17,"publisher":"Association for Computing Machinery (ACM)","issue":"11","content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Proc. VLDB Endow."],"published-print":{"date-parts":[[2017,8]]},"abstract":"<jats:p>\n            Query reverse engineering seeks to re-generate the SQL query that produced a given query output table from a given database. In this paper, we solve this problem for OLAP queries with group-by and aggregation. We develop a novel three-phase algorithm named REGAL\n            <jats:sup>1<\/jats:sup>\n            for this problem. First, based on a lattice graph structure, we identify a set of group-by candidates for the desired query. Second, we apply a set of aggregation constraints that are derived from the properties of aggregate operators at both the table-level and the group-level to discover candidate combinations of group-by columns and aggregations that are consistent with the given query output table. Finally, we find a multi-dimensional filter, i.e., a conjunction of selection predicates over the base table attributes, that is needed to generate the exact query output table. We conduct an extensive experimental study over the TPC-H dataset to demonstrate the effectiveness and efficiency of our proposal.\n          <\/jats:p>","DOI":"10.14778\/3137628.3137648","type":"journal-article","created":{"date-parts":[[2017,9,7]],"date-time":"2017-09-07T13:35:53Z","timestamp":1504791353000},"page":"1394-1405","source":"Crossref","is-referenced-by-count":19,"title":["Reverse engineering aggregation queries"],"prefix":"10.14778","volume":"10","author":[{"given":"Wei Chit","family":"Tan","sequence":"first","affiliation":[{"name":"Singapore University of Technology and Design"}]},{"given":"Meihui","family":"Zhang","sequence":"additional","affiliation":[{"name":"Singapore University of Technology and Design"}]},{"given":"Hazem","family":"Elmeleegy","sequence":"additional","affiliation":[{"name":"Turn Inc."}]},{"given":"Divesh","family":"Srivastava","sequence":"additional","affiliation":[{"name":"AT&amp;T Labs-Research"}]}],"member":"320","published-online":{"date-parts":[[2017,8]]},"reference":[{"key":"e_1_2_1_1_1","unstructured":"Regal algorithm. Available at https:\/\/github.com\/weichit\/Regal.  Regal algorithm. Available at https:\/\/github.com\/weichit\/Regal."},{"key":"e_1_2_1_2_1","doi-asserted-by":"publisher","DOI":"10.1007\/s00778-015-0389-y"},{"key":"e_1_2_1_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/564691.564782"},{"key":"e_1_2_1_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/2818637"},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/1804669.1804683"},{"key":"e_1_2_1_6_1","first-page":"670","volume-title":"VLDB","author":"Hristidis V.","year":"2002","unstructured":"V. Hristidis and Y. Papakonstantinou . Discover: Keyword search in relational databases . In VLDB , pages 670 -- 681 , 2002 . V. Hristidis and Y. Papakonstantinou. Discover: Keyword search in relational databases. In VLDB, pages 670--681, 2002."},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.14778\/2831360.2831369"},{"key":"e_1_2_1_8_1","unstructured":"K. Panev and S. Michel. Reverse engineering top-k database queries with paleo. EDBT 2016.  K. Panev and S. Michel. Reverse engineering top-k database queries with paleo. EDBT 2016."},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICDEW.2016.7495643"},{"key":"e_1_2_1_10_1","volume-title":"Schema independent relational learning. CoRR, abs\/1508.03846","author":"Picado J.","year":"2015","unstructured":"J. Picado , A. Termehchy , and A. Fern . Schema independent relational learning. CoRR, abs\/1508.03846 , 2015 . J. Picado, A. Termehchy, and A. Fern. Schema independent relational learning. CoRR, abs\/1508.03846, 2015."},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/2213836.2213846"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1016\/S0304-3975(97)00011-X"},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.1145\/2588555.2593664"},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.1145\/1559845.1559902"},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.1007\/s00778-013-0349-3"},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/2463676.2465320"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1145\/1499949.1500034"}],"container-title":["Proceedings of the VLDB Endowment"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.14778\/3137628.3137648","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2022,12,28]],"date-time":"2022-12-28T10:00:55Z","timestamp":1672221655000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.14778\/3137628.3137648"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2017,8]]},"references-count":17,"journal-issue":{"issue":"11","published-print":{"date-parts":[[2017,8]]}},"alternative-id":["10.14778\/3137628.3137648"],"URL":"https:\/\/doi.org\/10.14778\/3137628.3137648","relation":{},"ISSN":["2150-8097"],"issn-type":[{"value":"2150-8097","type":"print"}],"subject":[],"published":{"date-parts":[[2017,8]]}}}