(
(let $1 (DataSource '"yt" '"/Root/plato"))
(let $2 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
(let $3 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $2)))
(let $4 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" 'false)))))
(let $5 (YtStat '('Id '"Input") '('RecordsCount '"4") '('DataSize '"166") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
(let $6 (YtTable '"Input" $3 $4 $5 '() (Void) (Void) '"/Root/plato"))
(let $7 '('('"_logical_id" '1343) '('"_id" '"ac710ddd-dd1f29e-f151e14e-7aa2dda7") '('"_wide_channels" (StructType))))
(let $8 (DqPhyStage '() (lambda '() (block '(
  (let $23 (YtReadTable! world $1 '((YtSection '((YtPath $6 '() (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $23 '())))
))) $7))
(let $9 (DqCnBroadcast (TDqOutput $8 '0)))
(let $10 (Bool 'false))
(let $11 (OptionalType (DataType 'Uint64)))
(let $12 (lambda '($41) $41))
(let $13 '('('"_logical_id" '1473) '('"_id" '"d2c10613-a8218729-d76e772c-56213888") '('"_wide_channels" (StructType '('_yql_agg_0 $11)))))
(let $14 (DqPhyStage '($9) (lambda '($24) (block '(
  (let $25 (Condense1 (NarrowMap (ToFlow $24) (lambda '() (AsStruct))) (lambda '($27) (AsList $27)) (lambda '($28 $29) $10) (lambda '($30 $31) (Append $31 $30))))
  (let $26 (Condense1 (FlatMap $25 (lambda '($32) (block '(
    (let $33 (YtReadTable! world $1 '((YtSection '((YtPath $6 '('"key") (Void) (Void))) '()))))
    (return (NarrowFlatMap (DqReadWideWrap $33 '()) (lambda '($34) (Map (Collect $32) (lambda '($35) (AsStruct '('"a.key" $34)))))))
  )))) (lambda '($36) (SafeCast (Member $36 '"a.key") $11)) (lambda '($37 $38) $10) (lambda '($39 $40) (AggrAdd (SafeCast (Member $39 '"a.key") $11) $40))))
  (return (FromFlow (ExpandMap $26 $12)))
))) $13))
(let $15 (DqCnUnionAll (TDqOutput $14 '0)))
(let $16 (StructType '('Sum0 $11)))
(let $17 '('('"_logical_id" '2506) '('"_id" '"d72713e4-26c79830-126112f4-a2d52d2e") '('"_partition_mode" '"aggregate") '('"_wide_channels" $16)))
(let $18 (DqPhyStage '($15) (lambda '($42) (FromFlow (WideCondense1 (ToFlow $42) $12 (lambda '($43 $44) $10) (lambda '($45 $46) (AggrAdd $45 $46))))) $17))
(let $19 (DqCnUnionAll (TDqOutput $18 '0)))
(let $20 (DqPhyStage '($19) (lambda '($47) (block '(
  (let $48 (Condense (NarrowMap (ToFlow $47) (lambda '($49) (AsStruct '('Sum0 $49)))) (List (ListType $16)) (lambda '($50 $51) $10) (lambda '($52 $53) (AsList $52))))
  (return (FromFlow (Map $48 (lambda '($54) (AsStruct '('"column0" (Member (ToOptional $54) 'Sum0)))))))
))) '('('"_logical_id" '2556) '('"_id" '"5d3230bd-dd93004-20dd8309-f11a02ae"))))
(let $21 '($8 $14 $18 $20))
(let $22 (DqCnResult (TDqOutput $20 '0) '('"column0")))
(return (KqpPhysicalQuery '((KqpPhysicalTx $21 '($22) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType (StructType '('"column0" $11))) '0 '0)) '('('"type" '"query"))))
)
