(
(let $1 (DataType 'Double))
(let $2 '('('"_logical_id" '2326) '('"_id" '"cca0f171-d271ff25-5797ef2-40cbb618") '('"_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 '($10) (block '(
    (let $11 '('"_yql_agg_0_sum" '"sum" '"UserID"))
    (let $12 '('"_yql_agg_0_cnt" '"count" '"UserID"))
    (return (TKqpOlapAgg $10 '($11 $12) '()))
  )))))
  (let $9 (lambda '($13 $14 $15) (block '(
    (let $16 (BlockAsStruct '('"_yql_agg_0_cnt" $13) '('"_yql_agg_0_sum" $14)))
    (return (BlockMember $16 '"_yql_agg_0_sum") (BlockMember $16 '"_yql_agg_0_cnt") $15)
  ))))
  (return (FromFlow (WideMap (ToFlow (WideFromBlocks (FromFlow (WideMap $8 $9)))) (lambda '($17 $18) '((Convert $17 'Double) $18)))))
))) $2))
(let $4 (DqCnUnionAll (TDqOutput $3 '0)))
(let $5 (DqPhyStage '($4) (lambda '($19) (block '(
  (let $20 (lambda '($25) (Nth $25 '0) (Nth $25 '1)))
  (let $21 (Bool 'false))
  (let $22 (lambda '($29 $30 $31) (AggrAdd (Nth $29 '0) $30) (AggrAdd (Nth $29 '1) $31)))
  (let $23 (WideCondense1 (ToFlow $19) $20 (lambda '($26 $27 $28) $21) $22))
  (let $24 (Condense (NarrowMap (Take $23 (Uint64 '1)) (lambda '($32 $33) (AsStruct '('Avg0 (Div $32 $33))))) (Nothing (OptionalType (StructType '('Avg0 $1)))) (lambda '($34 $35) $21) (lambda '($36 $37) (Just $36))))
  (return (FromFlow (Map $24 (lambda '($38) (AsStruct '('"column0" (Member $38 'Avg0)))))))
))) '('('"_logical_id" '3993) '('"_id" '"10777047-73520400-aa972e03-b4bab3e4"))))
(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"))))
)
