Methods, computer programs, and database systems for analyzing one or more
queries are disclosed. Queries may include one or more conditions and one
or more sub-queries, with each sub-queries introduced by connecting
condition. The method determines the satisfiability of the query,
including the satisfiability of the connecting conditions and conditions
in the sub-queries. Queries may include one or more conditions of the
form (X+Y OP C). The method determines the satisfiability of the query,
including the satisfiability of the conditions of the form (X+Y OP C).