Alibabacloud, Database, Query Optimization, Sql, Relational Databases.
select c_custkey, ( select sum(o_totalprice) from orders where o_custkey = c_custkey and '2020-05-27' > ( select max(l_receiptdate) from lineitem where l_orderkey = o_orderkey ) ） from customer The convenience of using correlated subqueries is demonstrated in the examples above. However, the use of