(
(let $1 (OptionalType (DataType 'Int32)))
(let $2 (lambda '() (block '(
  (let $30 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
  (let $31 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $30)))
  (let $32 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" 'false)))))
  (let $33 (YtStat '('Id '"Input1") '('RecordsCount '"4") '('DataSize '"166") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
  (let $34 (YtTable '"Input1" $31 $32 $33 '() (Void) (Void) '"/Root/plato"))
  (let $35 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $34 '('"value") (Void) (Void))) '()))))
  (return (FromFlow (WideMap (DqReadWideWrap $35 '()) (lambda '($36) (SafeCast $36 $1)))))
))))
(let $3 '('"_logical_id" '2196))
(let $4 '('"_wide_channels" (StructType '('"v1" $1))))
(let $5 '($3 '('"_id" '"444d2f3e-cafb8af1-ef2b19af-bd3e46c4") $4))
(let $6 (DqPhyStage '() $2 $5))
(let $7 (DqCnUnionAll (TDqOutput $6 '0)))
(let $8 (lambda '($37) $37))
(let $9 '('('"_logical_id" '2258) '('"_id" '"f7f0d047-f481bc64-d9e84cc5-71db332a") $4))
(let $10 (DqPhyStage '($7) $8 $9))
(let $11 '('"_wide_channels" (StructType '('"v2" $1))))
(let $12 '($3 '('"_id" '"4c98ae7a-b54e13f1-cc555018-92c9fc94") $11))
(let $13 (DqPhyStage '() $2 $12))
(let $14 (DqCnUnionAll (TDqOutput $13 '0)))
(let $15 '('('"_logical_id" '2245) '('"_id" '"26b15ce8-aa6520fe-91a84eac-bdb882c3") $11))
(let $16 (DqPhyStage '($14) $8 $15))
(let $17 '('0))
(let $18 (DqCnHashShuffle (TDqOutput $10 '0) $17 '0 '"HashV2"))
(let $19 (DqCnHashShuffle (TDqOutput $16 '0) $17 '0 '"HashV2"))
(let $20 (Uint64 '1))
(let $21 (Bool 'false))
(let $22 (lambda '($57) $57))
(let $23 (DataType 'Uint64))
(let $24 '('('"_logical_id" '2394) '('"_id" '"5f5dad8a-b566a533-fdeae2d7-6e54b5cc") '('"_wide_channels" (StructType '('_yql_agg_0 $23)))))
(let $25 (DqPhyStage '($18 $19) (lambda '($38 $39) (block '(
  (let $40 (lambda '($44) $44))
  (let $41 '('Many 'Hashed 'Compact))
  (let $42 (NarrowSqueezeToDict (ToFlow $38) $40 (lambda '($45) (AsStruct '('"v1" $45))) $41))
  (let $43 (Condense1 (FlatMap $42 (lambda '($46) (block '(
    (let $47 (NarrowSqueezeToDict (ToFlow $39) $40 (lambda '($48) (AsStruct '('"v2" $48))) $41))
    (return (FlatMap $47 (lambda '($49) (block '(
      (let $50 (JoinDict $46 $49 'Full '()))
      (return (Map $50 (lambda '($51) (AsStruct))))
    )))))
  )))) (lambda '($52) $20) (lambda '($53 $54) $21) (lambda '($55 $56) (AggrAdd $56 $20))))
  (return (FromFlow (ExpandMap $43 $22)))
))) $24))
(let $26 (DqCnUnionAll (TDqOutput $25 '0)))
(let $27 (DqPhyStage '($26) (lambda '($58) (block '(
  (let $59 (WideCondense1 (ToFlow $58) $22 (lambda '($61 $62) $21) (lambda '($63 $64) (AggrAdd $63 $64))))
  (let $60 (Condense (NarrowMap (Take $59 $20) (lambda '($65) (AsStruct '('Count0 $65)))) (Nothing (OptionalType (StructType '('Count0 $23)))) (lambda '($66 $67) $21) (lambda '($68 $69) (Just $68))))
  (return (FromFlow (Map $60 (lambda '($70) (AsStruct '('"column0" (Coalesce (Member $70 'Count0) (Uint64 '0))))))))
))) '('('"_logical_id" '2793) '('"_id" '"76ad5ffa-8fccd3d5-d3ec5f8a-c42847e3"))))
(let $28 '($6 $10 $13 $16 $25 $27))
(let $29 (DqCnResult (TDqOutput $27 '0) '('"column0")))
(return (KqpPhysicalQuery '((KqpPhysicalTx $28 '($29) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType (StructType '('"column0" $23))) '0 '0)) '('('"type" '"query"))))
)
