(
(let $1 (DataType 'Uint64))
(let $2 '('"key" (DataType 'Uint32)))
(let $3 (StructType '('_yql_agg_0 $1) '('_yql_agg_1 $1) '('_yql_agg_2 $1) '('_yql_agg_3 $1) $2))
(let $4 '('('"_logical_id" '2664) '('"_id" '"fda1e240-8e980919-b079a91f-efc5553c") '('"_wide_channels" $3)))
(let $5 (DqPhyStage '() (lambda '() (block '(
  (let $15 '@@["StructType";[["key";["DataType";"Uint32"]];["subkey";["DataType";"Uint32"]]]]@@)
  (let $16 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $15)))
  (let $17 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" '"false")))))
  (let $18 (YtStat '('Id '"Input") '('RecordsCount '"3") '('DataSize '"78") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
  (let $19 (YtTable '"Input" $16 $17 $18 '() (Void) (Void) '"/Root/plato"))
  (let $20 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $19 '('"key" '"subkey") (Void) (Void))) '()))))
  (let $21 (Uint64 '1))
  (let $22 (Uint32 '1))
  (let $23 (Uint32 '"4"))
  (let $24 (/ $22 (Uint32 '0)))
  (let $25 (lambda '($30 $31 $32) $21 (AggrCountInit (/ $22 (- $23 $32))) $21 (AggrCountInit $24)))
  (let $26 (lambda '($33 $34 $35 $36 $37 $38 $39) (AggrAdd $36 $21) (AggrCountUpdate (/ $22 (- $23 $35)) $37) (Inc $38) (AggrCountUpdate $24 $39)))
  (let $27 (lambda '($40 $41 $42 $43 $44) $41 $42 $43 $44 $40))
  (return (DqPhyHashCombine (WideToBlocks (FromFlow (DqReadWideWrap $20 '()))) '-1073741824 (lambda '($28 $29) $28) $25 $26 $27))
))) $4))
(let $6 (DqCnHashShuffle (TDqOutput $5 '0) '('"4") '0 '"HashV2"))
(let $7 (StructType '('"column1" $1) '('"column2" $1) '('"column3" $1) '('"column4" $1) '('"column5" $1) $2))
(let $8 '('('"_logical_id" '2931) '('"_id" '"f4a705d-2b24a96c-d985a1ab-6287aa32") '('"_wide_channels" $7)))
(let $9 (DqPhyStage '($6) (lambda '($45) (block '(
  (let $46 (NarrowSqueezeToDict (ToFlow (WideFromBlocks $45)) (lambda '($50 $51 $52 $53 $54) $54) (lambda '($55 $56 $57 $58 $59) (AsStruct '('_yql_agg_0 $55) '('_yql_agg_1 $56) '('_yql_agg_2 $57) '('_yql_agg_3 $58) '('"key" $59))) '('Auto 'Many)))
  (let $47 (Condense1 (OrderedFlatMap $46 (lambda '($60) (OrderedFlatMap (DictPayloads $60) (lambda '($61) $61)))) (lambda '($62) $62) (lambda '($63 $64) (AggrNotEquals (Member $63 '"key") (Member $64 '"key"))) (lambda '($65 $66) (AsStruct '('_yql_agg_0 (AggrAdd (Member $65 '_yql_agg_0) (Member $66 '_yql_agg_0))) '('_yql_agg_1 (AggrAdd (Member $65 '_yql_agg_1) (Member $66 '_yql_agg_1))) '('_yql_agg_2 (AggrAdd (Member $65 '_yql_agg_2) (Member $66 '_yql_agg_2))) '('_yql_agg_3 (AggrAdd (Member $65 '_yql_agg_3) (Member $66 '_yql_agg_3))) '('"key" (Member $66 '"key"))))))
  (let $48 (Sort (Map $47 (lambda '($67) (block '(
    (let $68 (Member $67 '_yql_agg_2))
    (return (AsStruct '('"column1" (Member $67 '_yql_agg_0)) '('"column2" (Member $67 '_yql_agg_1)) '('"column3" $68) '('"column4" $68) '('"column5" (Member $67 '_yql_agg_3)) '('"key" (Member $67 '"key"))))
  )))) (Bool 'true) (lambda '($69) (Member $69 '"key"))))
  (let $49 (lambda '($70) (Member $70 '"column1") (Member $70 '"column2") (Member $70 '"column3") (Member $70 '"column4") (Member $70 '"column5") (Member $70 '"key")))
  (return (FromFlow (ExpandMap $48 $49)))
))) $8))
(let $10 (DqCnMerge (TDqOutput $9 '0) '('('"5" '"Asc"))))
(let $11 (DqPhyStage '($10) (lambda '($71) (FromFlow (NarrowMap (ToFlow $71) (lambda '($72 $73 $74 $75 $76 $77) (AsStruct '('"column1" $72) '('"column2" $73) '('"column3" $74) '('"column4" $75) '('"column5" $76) '('"key" $77)))))) '('('"_logical_id" '2943) '('"_id" '"b6b0ee39-409da0d1-963ec8d6-69bea89e"))))
(let $12 '($5 $9 $11))
(let $13 '('"key" '"column1" '"column2" '"column3" '"column4" '"column5"))
(let $14 (DqCnResult (TDqOutput $11 '0) $13))
(return (KqpPhysicalQuery '((KqpPhysicalTx $12 '($14) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $7) '0 '0)) '('('"type" '"query"))))
)
