(
(let $1 (DataType 'Double))
(let $2 '('('"_logical_id" '2326) '('"_id" '"549fb0d6-6087dd1-904456ff-9db7ea02") '('"_wide_channels" (StructType '('_yql_agg_0 (TupleType $1 (DataType 'Uint64)))))))
(let $3 (DqPhyStage '() (lambda '() (block '(
  (let $7 (KqpTable '"/local/test_db/olap_yatests/clickbench/hits" '"72075186224037897:8" '"" '1))
  (let $8 (KqpBlockReadOlapTableRanges $7 (Void) '('"UserID") '() '() (lambda '($9) (block '(
    (let $10 '('"_yql_agg_0_sum" '"sum" '"UserID"))
    (let $11 '('"_yql_agg_0_cnt" '"count" '"UserID"))
    (return (TKqpOlapAgg $9 '($10 $11) '()))
  )))))
  (return (FromFlow (WideMap (ToFlow (WideFromBlocks (FromFlow $8))) (lambda '($12 $13) '((Convert $13 'Double) $12)))))
))) $2))
(let $4 (DqCnUnionAll (TDqOutput $3 '0)))
(let $5 (DqPhyStage '($4) (lambda '($14) (block '(
  (let $15 (lambda '($20) (Nth $20 '0) (Nth $20 '1)))
  (let $16 (Bool 'false))
  (let $17 (lambda '($24 $25 $26) (AggrAdd (Nth $24 '0) $25) (AggrAdd (Nth $24 '1) $26)))
  (let $18 (WideCondense1 (ToFlow $14) $15 (lambda '($21 $22 $23) $16) $17))
  (let $19 (Condense (NarrowMap (Take $18 (Uint64 '1)) (lambda '($27 $28) (AsStruct '('Avg0 (Div $27 $28))))) (Nothing (OptionalType (StructType '('Avg0 $1)))) (lambda '($29 $30) $16) (lambda '($31 $32) (Just $31))))
  (return (FromFlow (Map $19 (lambda '($33) (AsStruct '('"column0" (Member $33 'Avg0)))))))
))) '('('"_logical_id" '3993) '('"_id" '"eb46a2e7-947b401c-13a48182-49310408"))))
(let $6 (DqCnResult (TDqOutput $5 '0) '('"column0")))
(return (KqpPhysicalQuery '((KqpPhysicalTx '($3 $5) '($6) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType (StructType '('"column0" (OptionalType $1)))) '0 '0)) '('('"type" '"query"))))
)
