Alibabacloud, Database, Query Optimization, Sql, Relational Databases.
query as an example: SELECT t1.c2 FROM t1 WHERE t1.c2 < ( SELECT 0.2 * max(t2.x) FROM t2 WHERE t2.c1 = t2.c1 GROUP BY t2.c1 ); Since t2.c1 = t2.c1 can be lifted up above agg, which is a condition on the agg group by column for subquery, the following conversion can be implemented. First, lift the