(
(let $1 '('('"_logical_id" '3030) '('"_id" '"251f6a0-6c6ad780-4e40008b-7ad711e6") '('"_partition_mode" '"single")))
(let $2 (DqPhyStage '() (lambda '() (Iterator (AsList (AsStruct '('"column0" (Uint64 '5)))))) $1))
(let $3 '('"column0"))
(let $4 (DqCnResult (TDqOutput $2 '0) $3))
(let $5 '('('"type" '"generic")))
(let $6 (KqpPhysicalTx '($2) '($4) '() $5))
(let $7 '@@["StructType";[["a";["OptionalType";["DataType";"Int64"]]];["b";["OptionalType";["DataType";"Uint64"]]];["c";["OptionalType";["DataType";"Double"]]];["d";["OptionalType";["DataType";"String"]]];["e";["OptionalType";["DataType";"Bool"]]];["f";["OptionalType";["DataType";"Yson"]]]]]@@)
(let $8 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $7)))
(let $9 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" 'false)))))
(let $10 (YtStat '('Id '"Input") '('RecordsCount '5) '('DataSize '"216") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
(let $11 (YtTable '"Input" $8 $9 $10 '() (Void) (Void) '"/Root/plato"))
(let $12 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $11 '('"e") (Void) (Void))) '()))))
(let $13 (Bool 'false))
(let $14 (DataType 'Uint64))
(let $15 '('('"_logical_id" '3134) '('"_id" '"6d007c26-3f13462c-d9edcc0d-da9da7bb") '('"_wide_channels" (StructType '('_yql_agg_0 $14)))))
(let $16 (DqPhyStage '() (lambda '() (block '(
  (let $40 (Condense1 (NarrowMap (DqReadWideWrap $12 '()) (lambda '($41) (AsStruct '('"e" $41)))) (lambda '($42) (AggrCountInit (Member $42 '"e"))) (lambda '($43 $44) $13) (lambda '($45 $46) (AggrCountUpdate (Member $45 '"e") $46))))
  (return (FromFlow (ExpandMap $40 (lambda '($47) $47))))
))) $15))
(let $17 (DqCnUnionAll (TDqOutput $16 '0)))
(let $18 (Uint64 '1))
(let $19 (Uint64 '0))
(let $20 (DqPhyStage '($17) (lambda '($48) (block '(
  (let $49 (Condense1 (NarrowMap (ToFlow $48) (lambda '($51) (AsStruct '('_yql_agg_0 $51)))) (lambda '($52) (Member $52 '_yql_agg_0)) (lambda '($53 $54) $13) (lambda '($55 $56) (AggrAdd (Member $55 '_yql_agg_0) $56))))
  (let $50 (Condense (Map (Take $49 $18) (lambda '($57) (AsStruct '('Count0 $57)))) (Nothing (OptionalType (StructType '('Count0 $14)))) (lambda '($58 $59) $13) (lambda '($60 $61) (Just $60))))
  (return (FromFlow (Map $50 (lambda '($62) (AsStruct '('"column0" (Coalesce (Member $62 'Count0) $19)))))))
))) '('('"_logical_id" '3578) '('"_id" '"f13b69fe-28eeac7f-93aaf7cd-f2822516"))))
(let $21 (DqCnResult (TDqOutput $20 '0) $3))
(let $22 (KqpPhysicalTx '($16 $20) '($21) '() $5))
(let $23 (lambda '($73) (Member $73 '"value")))
(let $24 '('('"_logical_id" '3761) '('"_id" '"80061350-5bb81314-4f63412a-de3f896b") '('"_wide_channels" (StructType '('"value" (DataType 'Bool))))))
(let $25 (DqPhyStage '() (lambda '() (block '(
  (let $63 (CombineCore (NarrowFlatMap (DqReadWideWrap $12 '()) (lambda '($64) $64)) (lambda '($65) $65) (lambda '($66 $67) (Void)) (lambda '($68 $69 $70) $70) (lambda '($71 $72) (Just (AsStruct '('"value" $71)))) '0))
  (return (FromFlow (ExpandMap $63 $23)))
))) $24))
(let $26 (DqCnHashShuffle (TDqOutput $25 '0) '('0) '0 '"HashV2"))
(let $27 '('('"_logical_id" '3875) '('"_id" '"b9c427a-39df830d-a5961a56-5ce67ed9") '('"_wide_channels" (StructType '('"_dq_agg_cnt" $14)))))
(let $28 (DqPhyStage '($26) (lambda '($74) (block '(
  (let $75 (PartitionByKey (NarrowMap (ToFlow $74) (lambda '($77) (AsStruct '('"value" $77)))) $23 (Void) (Void) (lambda '($78) (Map $78 (lambda '($79) (AsStruct))))))
  (let $76 (Condense $75 $19 (lambda '($80 $81) $13) (lambda '($82 $83) (AggrAdd $83 $18))))
  (return (FromFlow (ExpandMap $76 (lambda '($84) $84))))
))) $27))
(let $29 (DqCnUnionAll (TDqOutput $28 '0)))
(let $30 (DqPhyStage '($29) (lambda '($85) (block '(
  (let $86 (Condense (NarrowMap (ToFlow $85) (lambda '($87) (AsStruct '('"_dq_agg_cnt" $87)))) $19 (lambda '($88 $89) $13) (lambda '($90 $91) (AggrAdd $91 (Member $90 '"_dq_agg_cnt")))))
  (return (FromFlow (Map $86 (lambda '($92) (AsStruct '('"column0" $92))))))
))) '('('"_logical_id" '4041) '('"_id" '"fad0d76-bde460ce-a87d199e-40cbdca7"))))
(let $31 '($25 $28 $30))
(let $32 (DqCnResult (TDqOutput $30 '0) $3))
(let $33 (KqpPhysicalTx $31 '($32) '() $5))
(let $34 '($6 $22 $33))
(let $35 (ListType (StructType '('"column0" $14))))
(let $36 (KqpTxResultBinding $35 '0 '0))
(let $37 (KqpTxResultBinding $35 '1 '0))
(let $38 (KqpTxResultBinding $35 '"2" '0))
(let $39 '($36 $37 $38))
(return (KqpPhysicalQuery $34 $39 '('('"type" '"query"))))
)
