Write Primitives merge_from_subquery_aggregated
Write Primitives benchmark · all Write Primitives queries
Representative SQL
Rendered in the benchmark’s native SQL with default parameters (no dialect translation available).
MERGE INTO merge_ops_summary_target AS targetUSING ( SELECT o_custkey, SUM(o_totalprice) AS total_price, COUNT(*) AS order_count FROM orders WHERE o_orderkey <= 500 GROUP BY o_custkey) AS sourceON target.o_custkey = source.o_custkeyWHEN MATCHED THEN UPDATE SET o_totalprice = source.total_price, order_count = source.order_countWHEN NOT MATCHED THEN INSERT VALUES (NULL, source.o_custkey, NULL, source.total_price, NULL, source.order_count)Representative DataFrame
No DataFrame implementation is registered for this query.
Get the exact query for your run
The blocks above are representative. To get the precise statement a specific platform runs at a specific scale, substitute your own values:
from benchbox import WritePrimitives
bench = WritePrimitives(scale_factor=0.01) # your scale factorprint(bench.get_queries()['merge_from_subquery_aggregated'])Source
Query text: benchbox/core/write_primitives/operations.py