(
(let $1 (Uint64 '2))
(let $2 (Uint64 '1))
(let $3 (AggrAdd $1 $2))
(let $4 (DataType 'String))
(let $5 (StructType '('"key" $4) '('"subkey" $4) '('"value" $4)))
(let $6 '('"_wide_channels" $5))
(let $7 '('('"_logical_id" '878) '('"_id" '"7f5b84be-bec37c93-69a9b04a-9f10205d") $6))
(let $8 (DqPhyStage '() (lambda '() (block '(
  (let $17 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
  (let $18 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $17)))
  (let $19 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" '"false")))))
  (let $20 (YtStat '('Id '"Input") '('RecordsCount '"4") '('DataSize '"166") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
  (let $21 (YtTable '"Input" $18 $19 $20 '() (Void) (Void) '"/Root/plato"))
  (let $22 '('"key" '"subkey" '"value"))
  (let $23 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $21 $22 (Void) (Void))) '()))))
  (let $24 (Bool 'true))
  (return (FromFlow (WideTopSort (DqReadWideWrap $23 '()) $3 '('('0 $24) '('1 $24)))))
))) $7))
(let $9 (DqCnMerge (TDqOutput $8 '0) '('('0 '"Asc") '('1 '"Asc"))))
(let $10 '('('"_logical_id" '939) '('"_id" '"4b297a31-b7676f5e-d2d3a0f7-533fa4b4") $6))
(let $11 (DqPhyStage '($9) (lambda '($25) (block '(
  (let $26 (Uint64 '18446744073709551615))
  (let $27 (If (> $1 (- $26 $2)) $26 $3))
  (return (FromFlow (Take (ToFlow $25) (Min $27 $3))))
))) $10))
(let $12 (DqCnUnionAll (TDqOutput $11 '0)))
(let $13 (DqPhyStage '($12) (lambda '($28) (FromFlow (NarrowMap (Take (Skip (ToFlow $28) $2) $1) (lambda '($29 $30 $31) (AsStruct '('"key" $29) '('"subkey" $30) '('"value" $31)))))) '('('"_logical_id" '953) '('"_id" '"7cb27d37-f53f74dc-72cbf31a-4401d93e"))))
(let $14 '($8 $11 $13))
(let $15 '('"value" '"subkey" '"key"))
(let $16 (DqCnResult (TDqOutput $13 '0) $15))
(return (KqpPhysicalQuery '((KqpPhysicalTx $14 '($16) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $5) '0 '0)) '('('"type" '"query"))))
)
