(
(let $1 (DataType 'Uint64))
(let $2 '('"value" (DataType 'String)))
(let $3 '('('"_logical_id" '1402) '('"_id" '"478d5a85-82660974-92ee4466-78beae40") '('"_wide_channels" (StructType '('_yql_agg_0 $1) $2))))
(let $4 (DqPhyStage '() (lambda '() (block '(
  (let $13 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
  (let $14 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $13)))
  (let $15 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" '"false")))))
  (let $16 (YtStat '('Id '"Input") '('RecordsCount '"4") '('DataSize '"167") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
  (let $17 (YtTable '"Input" $14 $15 $16 '() (Void) (Void) '"/Root/plato"))
  (let $18 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $17 '('"key" '"value") (Void) (Void))) '()))))
  (let $19 (OptionalType (DataType 'Int32)))
  (let $20 (lambda '($30 $31) $31 $30))
  (return (DqPhyHashCombine (WideToBlocks (FromFlow (DqReadWideWrap $18 '()))) '-1073741824 (lambda '($21 $22) $22) (lambda '($23 $24 $25) (AggrCountInit (SafeCast $24 $19))) (lambda '($26 $27 $28 $29) (AggrCountUpdate (SafeCast $27 $19) $29)) $20))
))) $3))
(let $5 (DqCnHashShuffle (TDqOutput $4 '0) '('1) '0 '"HashV2"))
(let $6 (StructType '('"column0" $1) $2))
(let $7 '('('"_logical_id" '1652) '('"_id" '"ad402d59-15f82bc6-d7f19044-9cbbf425") '('"_wide_channels" $6)))
(let $8 (DqPhyStage '($5) (lambda '($32) (block '(
  (let $33 (NarrowSqueezeToDict (ToFlow (WideFromBlocks $32)) (lambda '($37 $38) $38) (lambda '($39 $40) (AsStruct '('_yql_agg_0 $39) '('"value" $40))) '('Auto 'Many)))
  (let $34 (Condense1 (OrderedFlatMap $33 (lambda '($41) (OrderedFlatMap (DictPayloads $41) (lambda '($42) $42)))) (lambda '($43) $43) (lambda '($44 $45) (AggrNotEquals (Member $44 '"value") (Member $45 '"value"))) (lambda '($46 $47) (AsStruct '('_yql_agg_0 (AggrAdd (Member $46 '_yql_agg_0) (Member $47 '_yql_agg_0))) '('"value" (Member $47 '"value"))))))
  (let $35 (Sort (Map $34 (lambda '($48) (AsStruct '('"column0" (Member $48 '_yql_agg_0)) '('"value" (Member $48 '"value"))))) (Bool 'true) (lambda '($49) (Member $49 '"value"))))
  (let $36 (lambda '($50) (Member $50 '"column0") (Member $50 '"value")))
  (return (FromFlow (ExpandMap $35 $36)))
))) $7))
(let $9 (DqCnMerge (TDqOutput $8 '0) '('('1 '"Asc"))))
(let $10 (DqPhyStage '($9) (lambda '($51) (FromFlow (NarrowMap (ToFlow $51) (lambda '($52 $53) (AsStruct '('"column0" $52) '('"value" $53)))))) '('('"_logical_id" '1664) '('"_id" '"bdc0f12-201b3cf8-3b31e974-f8ee238a"))))
(let $11 '($4 $8 $10))
(let $12 (DqCnResult (TDqOutput $10 '0) '('"column0" '"value")))
(return (KqpPhysicalQuery '((KqpPhysicalTx $11 '($12) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $6) '0 '0)) '('('"type" '"query"))))
)
