Alibabacloud, Database, Query Optimization, Sql, Relational Databases.
sum(o_totalprice) from orders where o_custkey = c_custkey ) from customer More complexly, for example, to query each customer and the corresponding total amount of orders they have been signed before a certain date, only a few changes are required by using correlated subqueries, shown as follows.