Queries, or calls to stored procedures/user-defined functions are often invoked multiple times, either from within a loop in an application program, or from the where/select claus...
In this paper, we study SQL queries with aggregate subqueries that share common tables and conditions with the outer query. While several approaches can deal with such queries, th...