(
(declare %kqp%tx_result_binding_0_0 (OptionalType (StructType '('Avg0 (DataType 'Double)) '('Count0 (DataType 'Uint64)) '('Sum0 (DataType 'Int64)))))
(let $1 (DataType 'Double))
(let $2 (DataType 'Uint64))
(let $3 (DataType 'Int64))
(let $4 (StructType '('_yql_agg_0 (TupleType $1 $2)) '('_yql_agg_1 $2) '('_yql_agg_2 $3)))
(let $5 '('('"_logical_id" '2758) '('"_id" '"144e933f-637d25eb-deeebd12-e7d00f2c") '('"_wide_channels" $4)))
(let $6 (DqPhyStage '() (lambda '() (block '(
  (let $20 (KqpTable '"/local/test_db/olap_yatests/clickbench/hits" '"72075186224037897:8" '"" '1))
  (let $21 (KqpBlockReadOlapTableRanges $20 (Void) '('"AdvEngineID" '"ResolutionWidth") '() '() (lambda '($23) (block '(
    (let $24 '('"_yql_agg_0_sum" 'sum '"ResolutionWidth"))
    (let $25 '('"_yql_agg_0_cnt" '"count" '"ResolutionWidth"))
    (let $26 '('_yql_agg_1 '"count" '"*"))
    (let $27 '('_yql_agg_2 'sum '"AdvEngineID"))
    (let $28 '($24 $25 $26 $27))
    (return (TKqpOlapAgg $23 $28 '()))
  )))))
  (let $22 (lambda '($29 $30 $31 $32) '((Convert $30 'Double) $29) $31 $32))
  (return (FromFlow (WideMap (ToFlow (WideFromBlocks (FromFlow $21))) $22)))
))) $5))
(let $7 (DqCnUnionAll (TDqOutput $6 '0)))
(let $8 (OptionalType (StructType '('Avg0 $1) '('Count0 $2) '('Sum0 $3))))
(let $9 (DqPhyStage '($7) (lambda '($33) (block '(
  (let $34 (lambda '($38 $39 $40) (Nth $38 '0) (Nth $38 '1) $39 $40))
  (let $35 (Bool 'false))
  (let $36 (lambda '($48 $49 $50 $51 $52 $53 $54) (AggrAdd (Nth $48 '0) $51) (AggrAdd (Nth $48 '1) $52) (AggrAdd $49 $53) (AggrAdd $50 $54)))
  (let $37 (WideCondense1 (ToFlow $33) $34 (lambda '($41 $42 $43 $44 $45 $46 $47) $35) $36))
  (return (FromFlow (Condense (NarrowMap (Take $37 (Uint64 '1)) (lambda '($55 $56 $57 $58) (AsStruct '('Avg0 (Div $55 $56)) '('Count0 $57) '('Sum0 $58)))) (Nothing $8) (lambda '($59 $60) $35) (lambda '($61 $62) (Just $61)))))
))) '('('"_logical_id" '4590) '('"_id" '"f1853fae-e0a0c4bd-d30d1d9e-4cab6100"))))
(let $10 (DqCnValue (TDqOutput $9 '0)))
(let $11 '('('"type" '"generic")))
(let $12 (KqpPhysicalTx '($6 $9) '($10) '() $11))
(let $13 '"%kqp%tx_result_binding_0_0")
(let $14 '('('"_logical_id" '4718) '('"_id" '"e05ed952-39dca5ea-e09df73c-bc74d58b") '('"_partition_mode" '"single")))
(let $15 (DqPhyStage '() (lambda '() (block '(
  (let $63 %kqp%tx_result_binding_0_0)
  (return (Iterator (AsList (AsStruct '('"column0" (Member $63 'Sum0)) '('"column1" (Coalesce (Member $63 'Count0) (Uint64 '0))) '('"column2" (Member $63 'Avg0))))))
))) $14))
(let $16 '('"column0" '"column1" '"column2"))
(let $17 (DqCnResult (TDqOutput $15 '0) $16))
(let $18 (KqpTxResultBinding $8 '0 '0))
(let $19 (KqpPhysicalTx '($15) '($17) '('($13 $18)) $11))
(return (KqpPhysicalQuery '($12 $19) '((KqpTxResultBinding (ListType (StructType '('"column0" (OptionalType $3)) '('"column1" $2) '('"column2" (OptionalType $1)))) '1 '0)) '('('"type" '"query"))))
)
