(
(let $1 (lambda '($29 $30 $31) (AsStruct '('_yql_sys_order_by (Concat $29 $31)) '('"key" $29) '('"subkey" $30) '('"value" $31))))
(let $2 (Uint64 '1))
(let $3 (Coalesce (+ (Just (Uint64 '4)) (Int32 '"10")) (Uint64 '0)))
(let $4 (AggrAdd $2 $3))
(let $5 (Bool 'true))
(let $6 (lambda '($32) (Member $32 '_yql_sys_order_by)))
(let $7 (DataType 'String))
(let $8 '('"key" $7))
(let $9 '('"subkey" $7))
(let $10 (StructType $8 $9 '('"value" $7)))
(let $11 '('('"_logical_id" '1913) '('"_id" '"b664a928-ded537f2-d5b79fe4-22a63464") '('"_wide_channels" $10)))
(let $12 (DqPhyStage '() (lambda '() (block '(
  (let $20 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
  (let $21 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $20)))
  (let $22 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" '"false")))))
  (let $23 (YtStat '('Id '"Input") '('RecordsCount '4) '('DataSize '"166") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
  (let $24 (YtTable '"Input" $21 $22 $23 '() (Void) (Void) '"/Root/plato"))
  (let $25 '('"key" '"subkey" '"value"))
  (let $26 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $24 $25 (Void) (Void))) '()))))
  (let $27 (Top (NarrowMap (DqReadWideWrap $26 '()) $1) $4 $5 $6))
  (let $28 (lambda '($33) (Member $33 '"key") (Member $33 '"subkey") (Member $33 '"value")))
  (return (FromFlow (ExpandMap $27 $28)))
))) $11))
(let $13 (DqCnUnionAll (TDqOutput $12 '0)))
(let $14 '('('"_logical_id" '2023) '('"_id" '"48efbf1f-9833f2de-5970e2df-42f49bd1") '('"_wide_channels" (StructType $8 $9))))
(let $15 (DqPhyStage '($13) (lambda '($34) (block '(
  (let $35 (Uint64 '18446744073709551615))
  (let $36 (If (> $2 (- $35 $3)) $35 $4))
  (let $37 (TopSort (NarrowMap (ToFlow $34) $1) (Min $36 $4) $5 $6))
  (let $38 (lambda '($39) (Member $39 '"key") (Member $39 '"subkey")))
  (return (FromFlow (ExpandMap $37 $38)))
))) $14))
(let $16 (DqCnUnionAll (TDqOutput $15 '0)))
(let $17 (DqPhyStage '($16) (lambda '($40) (FromFlow (NarrowMap (Take (Skip (ToFlow $40) $3) $2) (lambda '($41 $42) (AsStruct '('"key" $41) '('"l" (Size $41)) '('"subkey" $42)))))) '('('"_logical_id" '2088) '('"_id" '"94288a2b-f38afe3b-11aa06e6-11742080"))))
(let $18 '($12 $15 $17))
(let $19 (DqCnResult (TDqOutput $17 '0) '()))
(return (KqpPhysicalQuery '((KqpPhysicalTx $18 '($19) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType (StructType $8 '('"l" (DataType 'Uint32)) $9)) '0 '0)) '('('"type" '"query"))))
)
