(
(let $1 (DataType 'String))
(let $2 '('"key" $1))
(let $3 '('('"_logical_id" '1359) '('"_id" '"3d8f0eee-cab5b32c-5d2ace9d-378c5b4f") '('"_wide_channels" (StructType '('_yql_agg_0 $1) $2))))
(let $4 (DqPhyStage '() (lambda '() (block '(
  (let $14 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
  (let $15 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $14)))
  (let $16 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" '"false")))))
  (let $17 (YtStat '('Id '"Input") '('RecordsCount '"4") '('DataSize '"166") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
  (let $18 (YtTable '"Input" $15 $16 $17 '() (Void) (Void) '"/Root/plato"))
  (let $19 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $18 '('"key" '"value") (Void) (Void))) '()))))
  (let $20 (lambda '($30 $31) $31 $30))
  (return (DqPhyHashCombine (WideToBlocks (FromFlow (DqReadWideWrap $19 '()))) '-1073741824 (lambda '($21 $22) $21) (lambda '($23 $24 $25) $25) (lambda '($26 $27 $28 $29) (AggrMax $28 $29)) $20))
))) $3))
(let $5 (DqCnHashShuffle (TDqOutput $4 '0) '('1) '0 '"HashV2"))
(let $6 (StructType $2 '('"subkey" $1) '('"value" $1)))
(let $7 '('('"_logical_id" '1606) '('"_id" '"238dd713-ffbb0044-895bcc63-badcaa90") '('"_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) '('"key" $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 '"key") (Member $45 '"key"))) (lambda '($46 $47) (AsStruct '('_yql_agg_0 (AggrMax (Member $46 '_yql_agg_0) (Member $47 '_yql_agg_0))) '('"key" (Member $47 '"key"))))))
  (let $35 (Sort (Map $34 (lambda '($48) (AsStruct '('"key" (Member $48 '"key")) '('"subkey" (String '"WAT")) '('"value" (Member $48 '_yql_agg_0))))) (Bool 'true) (lambda '($49) (Member $49 '"key"))))
  (let $36 (lambda '($50) (Member $50 '"key") (Member $50 '"subkey") (Member $50 '"value")))
  (return (FromFlow (ExpandMap $35 $36)))
))) $7))
(let $9 (DqCnMerge (TDqOutput $8 '0) '('('0 '"Asc"))))
(let $10 (DqPhyStage '($9) (lambda '($51) (FromFlow (NarrowMap (ToFlow $51) (lambda '($52 $53 $54) (AsStruct '('"key" $52) '('"subkey" $53) '('"value" $54)))))) '('('"_logical_id" '1618) '('"_id" '"b416a8b8-9bc27894-9b3b5224-3b81b1f4"))))
(let $11 '($4 $8 $10))
(let $12 '('"key" '"subkey" '"value"))
(let $13 (DqCnResult (TDqOutput $10 '0) $12))
(return (KqpPhysicalQuery '((KqpPhysicalTx $11 '($13) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $6) '0 '0)) '('('"type" '"query"))))
)
