-| | VirtualExecutionPlan name=duckdb compute_context=/Users/qianqian/datafusion-federation/tpch_sf1.db sql=SELECT customer.c_custkey, customer.c_name, sum((lineitem.l_extendedprice * (1 - lineitem.l_discount))) AS revenue, customer.c_acctbal, nation.n_name, customer.c_address, customer.c_phone, customer.c_comment FROM customer JOIN orders ON ((customer.c_custkey = orders.o_custkey) AND ((orders.o_orderdate >= CAST('1993-10-01' AS DATE)) AND (orders.o_orderdate < CAST('1994-01-01' AS DATE)))) JOIN lineitem ON ((lineitem.l_orderkey = orders.o_orderkey) AND (lineitem.l_returnflag = 'R')) JOIN nation ON (customer.c_nationkey = nation.n_nationkey) GROUP BY customer.c_custkey, customer.c_name, customer.c_acctbal, customer.c_phone, nation.n_name, customer.c_address, customer.c_comment ORDER BY revenue DESC NULLS FIRST LIMIT 20 rewritten_sql=SELECT "customer"."c_custkey", "customer"."c_name", sum(("lineitem"."l_extendedprice" * (1 - "lineitem"."l_discount"))) AS "revenue", "customer"."c_acctbal", "nation"."n_name", "customer"."c_address", "customer"."c_phone", "customer"."c_comment" FROM "customer" JOIN "orders" ON (("customer"."c_custkey" = "orders"."o_custkey") AND (("orders"."o_orderdate" >= CAST('1993-10-01' AS DATE)) AND ("orders"."o_orderdate" < CAST('1994-01-01' AS DATE)))) JOIN "lineitem" ON (("lineitem"."l_orderkey" = "orders"."o_orderkey") AND ("lineitem"."l_returnflag" = 'R')) JOIN "nation" ON ("customer"."c_nationkey" = "nation"."n_nationkey") GROUP BY "customer"."c_custkey", "customer"."c_name", "customer"."c_acctbal", "customer"."c_phone", "nation"."n_name", "customer"."c_address", "customer"."c_comment" ORDER BY "revenue" DESC NULLS FIRST LIMIT 20 |
0 commit comments