(
(let $1 (DataType 'String))
(let $2 '('key $1))
(let $3 (StructType $2 '('"subkey" $1) '('"value" $1)))
(let $4 '('('"_logical_id" '904) '('"_id" '"ca2cab84-a0432f2a-17a7ccca-251460c7") '('"_wide_channels" $3)))
(let $5 (DqPhyStage '() (lambda '() (block '(
  (let $15 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
  (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 '"Input1") '('RecordsCount '"9") '('DataSize '"360") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
  (let $19 (YtTable '"Input1" $16 $17 $18 '() (Void) (Void) '"/Root/plato"))
  (let $20 '('key '"subkey" '"value"))
  (let $21 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $19 $20 (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $21 '())))
))) $4))
(let $6 (DqCnHashShuffle (TDqOutput $5 '0) '('0) '0 '"HashV2"))
(let $7 (DataType 'Uint32))
(let $8 (StructType $2 '('summ (ListType $7))))
(let $9 '('('"_logical_id" '1298) '('"_id" '"a718e54-635e96b7-a10639a3-f4d3a086") '('"_wide_channels" $8)))
(let $10 (DqPhyStage '($6) (lambda '($22) (block '(
  (let $23 (NarrowSqueezeToDict (ToFlow $22) (lambda '($27 $28 $29) $27) (lambda '($30 $31 $32) (AsStruct '('key $30) '('"subkey" $31) '('"value" $32))) '('Auto 'Many)))
  (let $24 (Chopper (OrderedFlatMap $23 (lambda '($33) (OrderedFlatMap (DictPayloads $33) (lambda '($34) $34)))) (lambda '($35) (Member $35 'key)) (lambda '($36 $37) (AggrNotEquals $36 (Member $37 'key))) (lambda '($38 $39) (block '(
    (let $40 (Uint32 '0))
    (return (ToFlow (Just (AsStruct '('key $38) '('summ (Collect (Condense $39 $40 (lambda '($41 $42) (Bool '"false")) (lambda '($43 $44) (Add $44 (Coalesce (SafeCast (Member $43 '"value") (OptionalType $7)) $40))))))))))
  )))))
  (let $25 (Sort $24 (Bool 'true) (lambda '($45) (Member $45 'key))))
  (let $26 (lambda '($46) (Member $46 'key) (Member $46 'summ)))
  (return (FromFlow (ExpandMap $25 $26)))
))) $9))
(let $11 (DqCnMerge (TDqOutput $10 '0) '('('0 '"Asc"))))
(let $12 (DqPhyStage '($11) (lambda '($47) (FromFlow (NarrowMap (ToFlow $47) (lambda '($48 $49) (AsStruct '('key $48) '('summ $49)))))) '('('"_logical_id" '1310) '('"_id" '"bf6a3c92-a1b7275f-48c2dfc3-3af26835"))))
(let $13 '($5 $10 $12))
(let $14 (DqCnResult (TDqOutput $12 '0) '()))
(return (KqpPhysicalQuery '((KqpPhysicalTx $13 '($14) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $8) '0 '0)) '('('"type" '"query"))))
)
