(
(let $1 (DataType 'Utf8))
(let $2 '($1 '"" '1))
(let $3 (CallableType '() '($1) $2))
(let $4 (Udf '"Unicode.ToUpper" (Void) (VoidType) '"" $3 (VoidType) '"" '('('"blocks") '('"strict"))))
(let $5 (DataType 'String))
(let $6 (DataType 'Uint64))
(let $7 (Convert (Size (SafeCast (Apply $4 (Utf8 '"a")) $5)) $6))
(let $8 (Convert (Size (SafeCast (Apply $4 (Utf8 '"bc")) $5)) $6))
(let $9 (AggrAdd $7 $8))
(let $10 (StructType '('"key" $5) '('"subkey" $5) '('"value" $5)))
(let $11 '('"_wide_channels" $10))
(let $12 '('('"_logical_id" '736) '('"_id" '"1a1e36eb-c15a8b4d-63c91e-66f7b399") $11))
(let $13 (DqPhyStage '() (lambda '() (block '(
  (let $21 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
  (let $22 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $21)))
  (let $23 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" '"false")))))
  (let $24 (YtStat '('Id '"Input") '('RecordsCount '"4") '('DataSize '"166") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
  (let $25 (YtTable '"Input" $22 $23 $24 '() (Void) (Void) '"/Root/plato"))
  (let $26 '('"key" '"subkey" '"value"))
  (let $27 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $25 $26 (Void) (Void))) '()))))
  (return (FromFlow (WideTopSort (DqReadWideWrap $27 '()) $9 '('('0 (Bool 'true))))))
))) $12))
(let $14 (DqCnMerge (TDqOutput $13 '0) '('('0 '"Asc"))))
(let $15 '('('"_logical_id" '795) '('"_id" '"a78a5be8-1dba2862-e10ced01-dd8e47cf") $11))
(let $16 (DqPhyStage '($14) (lambda '($28) (block '(
  (let $29 (Uint64 '18446744073709551615))
  (let $30 (If (> $7 (- $29 $8)) $29 $9))
  (return (FromFlow (Take (ToFlow $28) (Min $30 $9))))
))) $15))
(let $17 (DqCnUnionAll (TDqOutput $16 '0)))
(let $18 (DqPhyStage '($17) (lambda '($31) (FromFlow (NarrowMap (Take (Skip (ToFlow $31) $8) $7) (lambda '($32 $33 $34) (AsStruct '('"key" $32) '('"subkey" $33) '('"value" $34)))))) '('('"_logical_id" '809) '('"_id" '"5210f5c0-c90113aa-fb6cb0e5-743fe534"))))
(let $19 '($13 $16 $18))
(let $20 (DqCnResult (TDqOutput $18 '0) '()))
(return (KqpPhysicalQuery '((KqpPhysicalTx $19 '($20) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $10) '0 '0)) '('('"type" '"query"))))
)
