(
(let $1 '('"UserID" (DataType 'Int64)))
(let $2 (DataType 'Uint64))
(let $3 '('('"_logical_id" '1501) '('"_id" '"af54ffaa-a8797aa0-f3df54ef-c1204163") '('"_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 '('"UserID"))
  (let $16 (KqpBlockReadOlapTableRanges $14 (Void) $15 '() '() (lambda '($17) (TKqpOlapAgg $17 '('('_yql_agg_0 '"count" '"*")) $15))))
  (return (FromFlow $16))
))) $3))
(let $5 '('0))
(let $6 (DqCnHashShuffle (TDqOutput $4 '0) $5 '0 '"HashV1"))
(let $7 (Uint64 '10))
(let $8 '('('"_logical_id" '1952) '('"_id" '"6c39489f-82eb7e3d-b435eff7-a4174f09") '('"_wide_channels" (StructType '('Count0 $2) $1))))
(let $9 (DqPhyStage '($6) (lambda '($18) (block '(
  (let $19 (AggBlockApplyState '"count_all" $2 $2))
  (let $20 (WideTopSort (ToFlow (WideFromBlocks (BlockMergeFinalizeHashed $18 $5 '('($19 '1))))) $7 '('('1 (Bool 'false)))))
  (let $21 (lambda '($22 $23) $23 $22))
  (return (FromFlow (WideMap $20 $21)))
))) $8))
(let $10 (DqCnMerge (TDqOutput $9 '0) '('('0 '"Desc"))))
(let $11 (DqPhyStage '($10) (lambda '($24) (FromFlow (NarrowMap (Take (ToFlow $24) $7) (lambda '($25 $26) (AsStruct '('"UserID" $26) '('"cnt" $25)))))) '('('"_logical_id" '2067) '('"_id" '"a253a814-f7e73931-5b75a323-3e3a3d3b"))))
(let $12 '($4 $9 $11))
(let $13 (DqCnResult (TDqOutput $11 '0) '('"UserID" '"cnt")))
(return (KqpPhysicalQuery '((KqpPhysicalTx $12 '($13) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType (StructType $1 '('"cnt" $2))) '0 '0)) '('('"type" '"query"))))
)
