(
(let $1 '('"AdvEngineID" (DataType 'Int16)))
(let $2 (DataType 'Uint64))
(let $3 '('('"_logical_id" '1711) '('"_id" '"6705bb7b-a0cee86-e34dcd3a-9e12b4d3") '('"_wide_channels" (StructType $1 '('_yql_agg_0 $2)))))
(let $4 (DqPhyStage '() (lambda '() (block '(
  (let $14 (KqpTable '"/local/test_db/olap_yatests/clickbench/hits" '"72075186224037897:8" '"" '1))
  (let $15 '('"AdvEngineID"))
  (let $16 (KqpBlockReadOlapTableRanges $14 (Void) $15 '() '() (lambda '($17) (block '(
    (let $18 '('neq '"AdvEngineID" (Int32 '0)))
    (return (TKqpOlapAgg (KqpOlapFilter $17 $18) '('('_yql_agg_0 '"count" '"*")) $15))
  )))))
  (return (FromFlow $16))
))) $3))
(let $5 '('0))
(let $6 (DqCnHashShuffle (TDqOutput $4 '0) $5 '0 '"HashV1"))
(let $7 (StructType $1 '('"cnt" $2)))
(let $8 '('('"_logical_id" '2241) '('"_id" '"2f2793d9-debe8749-379664df-9f9e1704") '('"_wide_channels" $7)))
(let $9 (DqPhyStage '($6) (lambda '($19) (block '(
  (let $20 (AggBlockApplyState '"count_all" $2 $2))
  (return (FromFlow (WideSort (ToFlow (WideFromBlocks (BlockMergeFinalizeHashed $19 $5 '('($20 '1))))) '('('1 (Bool 'false))))))
))) $8))
(let $10 (DqCnMerge (TDqOutput $9 '0) '('('1 '"Desc"))))
(let $11 (DqPhyStage '($10) (lambda '($21) (FromFlow (NarrowMap (ToFlow $21) (lambda '($22 $23) (AsStruct '('"AdvEngineID" $22) '('"cnt" $23)))))) '('('"_logical_id" '2253) '('"_id" '"9330de27-94d92831-d597ad6a-129ea31c"))))
(let $12 '($4 $9 $11))
(let $13 (DqCnResult (TDqOutput $11 '0) '('"AdvEngineID" '"cnt")))
(return (KqpPhysicalQuery '((KqpPhysicalTx $12 '($13) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $7) '0 '0)) '('('"type" '"query"))))
)
