(
(declare %kqp%tx_result_binding_0_0 (OptionalType (StructType '('Count0 (DataType 'Uint64)) '('Count1 (DataType 'Uint64)) '('Count2 (DataType 'Uint64)) '('Count4 (DataType 'Uint64)))))
(let $1 (Uint64 '1))
(let $2 (Bool 'false))
(let $3 (DataType 'Uint64))
(let $4 (StructType '('_yql_agg_0 $3) '('_yql_agg_1 $3) '('_yql_agg_2 $3) '('_yql_agg_3 $3)))
(let $5 '('('"_logical_id" '2592) '('"_id" '"2e4b34e9-d52c2a11-565459d6-a85030ae") '('"_wide_channels" $4)))
(let $6 (DqPhyStage '() (lambda '() (block '(
  (let $19 '@@["StructType";[["key";["DataType";"Uint64"]];["subkey";["DataType";"Uint64"]]]]@@)
  (let $20 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $19)))
  (let $21 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" 'false)))))
  (let $22 (YtStat '('Id '"Input") '('RecordsCount '"2") '('DataSize '"52") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
  (let $23 (YtTable '"Input" $20 $21 $22 '() (Void) (Void) '"/Root/plato"))
  (let $24 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $23 '('"key" '"subkey") (Void) (Void))) '()))))
  (let $25 (Uint32 '1))
  (let $26 (Uint32 '"4"))
  (let $27 (/ $25 (Uint32 '0)))
  (let $28 (lambda '($30 $31) $1 (AggrCountInit (+ $30 (/ $25 (- $26 $31)))) $1 (AggrCountInit $27)))
  (let $29 (lambda '($38 $39 $40 $41 $42 $43) (AggrAdd $40 $1) (AggrCountUpdate (+ $38 (/ $25 (- $26 $39))) $41) (Inc $42) (AggrCountUpdate $27 $43)))
  (return (FromFlow (WideCondense1 (DqReadWideWrap $24 '()) $28 (lambda '($32 $33 $34 $35 $36 $37) $2) $29)))
))) $5))
(let $7 (DqCnUnionAll (TDqOutput $6 '0)))
(let $8 (OptionalType (StructType '('Count0 $3) '('Count1 $3) '('Count2 $3) '('Count4 $3))))
(let $9 (DqPhyStage '($7) (lambda '($44) (block '(
  (let $45 (lambda '($48 $49 $50 $51) $48 $49 $50 $51))
  (let $46 (lambda '($60 $61 $62 $63 $64 $65 $66 $67) (AggrAdd $60 $64) (AggrAdd $61 $65) (AggrAdd $62 $66) (AggrAdd $63 $67)))
  (let $47 (WideCondense1 (ToFlow $44) $45 (lambda '($52 $53 $54 $55 $56 $57 $58 $59) $2) $46))
  (return (FromFlow (Condense (NarrowMap (Take $47 $1) (lambda '($68 $69 $70 $71) (AsStruct '('Count0 $68) '('Count1 $69) '('Count2 $70) '('Count4 $71)))) (Nothing $8) (lambda '($72 $73) $2) (lambda '($74 $75) (Just $74)))))
))) '('('"_logical_id" '2963) '('"_id" '"3e92a2e0-f128745d-b7173bdd-2df04794"))))
(let $10 (DqCnValue (TDqOutput $9 '0)))
(let $11 (KqpPhysicalTx '($6 $9) '($10) '() '('('"type" '"compute"))))
(let $12 '"%kqp%tx_result_binding_0_0")
(let $13 '('('"_logical_id" '3045) '('"_id" '"b11f1080-bb57cc2e-626011d1-fa332c09") '('"_partition_mode" '"single")))
(let $14 (DqPhyStage '() (lambda '() (block '(
  (let $76 %kqp%tx_result_binding_0_0)
  (let $77 (Uint64 '0))
  (let $78 (Coalesce (Member $76 'Count2) $77))
  (return (Iterator (AsList (AsStruct '('"column0" (Coalesce (Member $76 'Count0) $77)) '('"column1" (Coalesce (Member $76 'Count1) $77)) '('"column2" $78) '('"column3" $78) '('"column4" (Coalesce (Member $76 'Count4) $77))))))
))) $13))
(let $15 '('"column0" '"column1" '"column2" '"column3" '"column4"))
(let $16 (DqCnResult (TDqOutput $14 '0) $15))
(let $17 (KqpTxResultBinding $8 '0 '0))
(let $18 (KqpPhysicalTx '($14) '($16) '('($12 $17)) '('('"type" '"generic"))))
(return (KqpPhysicalQuery '($11 $18) '((KqpTxResultBinding (ListType (StructType '('"column0" $3) '('"column1" $3) '('"column2" $3) '('"column3" $3) '('"column4" $3))) '1 '0)) '('('"type" '"query"))))
)
