(
(let $1 '('('"_logical_id" '3057) '('"_id" '"32b4ec09-19070498-5988c80e-33d69689") '('"_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) '('HasRLS '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) (Void))) '()))))
(let $13 (Bool 'false))
(let $14 (DataType 'Uint64))
(let $15 '('('"_logical_id" '3161) '('"_id" '"6427e3b-50473330-b5123498-6a088948") '('"_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" '3605) '('"_id" '"218bf5a3-50eea9e9-d3fee709-f77190f9"))))
(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" '3788) '('"_id" '"bb39fe52-5db14d59-7a4769de-22325782") '('"_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" '3902) '('"_id" '"5f27c2d2-8b047b87-c0953b40-42fd8b55") '('"_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" '4068) '('"_id" '"ac17eeef-a00e24c0-7ea29fae-948c228f"))))
(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"))))
)
