(
(let $1 (Uint64 '1))
(let $2 (AggrAdd $1 $1))
(let $3 (DataType 'String))
(let $4 (StructType '('"key" $3) '('"subkey" $3) '('"value" $3)))
(let $5 '('"_wide_channels" $4))
(let $6 '('('"_logical_id" '974) '('"_id" '"c16b5d90-26ffdafb-2f984e58-ff87d65b") $5))
(let $7 (DqPhyStage '() (lambda '() (block '(
  (let $16 '@@["StructType";[["value";["DataType";"String"]];["subkey";["DataType";"String"]];["key";["DataType";"String"]]]]@@)
  (let $17 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $16)))
  (let $18 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" '"false")))))
  (let $19 (YtStat '('Id '"Input") '('RecordsCount '"4") '('DataSize '"166") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
  (let $20 (YtTable '"Input" $17 $18 $19 '() (Void) (Void) '"/Root/plato"))
  (let $21 '('"key" '"subkey" '"value"))
  (let $22 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $20 $21 (Void) (Void))) '()))))
  (let $23 (Bool 'true))
  (return (FromFlow (WideTopSort (DqReadWideWrap $22 '()) $2 '('('0 $23) '('1 $23)))))
))) $6))
(let $8 (DqCnMerge (TDqOutput $7 '0) '('('0 '"Asc") '('1 '"Asc"))))
(let $9 '('('"_logical_id" '1035) '('"_id" '"ca4c9c89-85c6770e-4067ba37-d29dac1f") $5))
(let $10 (DqPhyStage '($8) (lambda '($24) (block '(
  (let $25 (Uint64 '18446744073709551615))
  (let $26 (If (> $1 (- $25 $1)) $25 $2))
  (return (FromFlow (Take (ToFlow $24) (Min $26 $2))))
))) $9))
(let $11 (DqCnUnionAll (TDqOutput $10 '0)))
(let $12 (DqPhyStage '($11) (lambda '($27) (FromFlow (NarrowMap (Take (Skip (ToFlow $27) $1) $1) (lambda '($28 $29 $30) (AsStruct '('"key" $28) '('"subkey" $29) '('"value" $30)))))) '('('"_logical_id" '1049) '('"_id" '"94666a02-cc962de-3e8e5632-cd2e9e8f"))))
(let $13 '($7 $10 $12))
(let $14 '('"subkey" '"key" '"value"))
(let $15 (DqCnResult (TDqOutput $12 '0) $14))
(return (KqpPhysicalQuery '((KqpPhysicalTx $13 '($15) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $4) '0 '0)) '('('"type" '"query"))))
)
