(
(let $1 '('"SearchPhrase" (DataType 'Utf8)))
(let $2 '('"UserID" (DataType 'Int64)))
(let $3 (DataType 'Uint64))
(let $4 (StructType $1 $2 '('_yql_agg_0 $3)))
(let $5 '('('"_logical_id" '1553) '('"_id" '"e1e1dbb8-646376ab-259828ff-52bd5fa6") '('"_wide_channels" $4)))
(let $6 (DqPhyStage '() (lambda '() (block '(
  (let $18 (KqpTable '"/local/test_db/olap_yatests/clickbench/hits" '"72075186224037897:8" '"" '1))
  (let $19 '('"SearchPhrase" '"UserID"))
  (let $20 (KqpBlockReadOlapTableRanges $18 (Void) $19 '() '() (lambda '($21) (TKqpOlapAgg $21 '('('_yql_agg_0 '"count" '"*")) $19))))
  (return (FromFlow $20))
))) $5))
(let $7 '('0 '1))
(let $8 (DqCnHashShuffle (TDqOutput $6 '0) $7 '0 '"HashV1"))
(let $9 (Uint64 '10))
(let $10 (StructType '('Count0 $3) $1 $2))
(let $11 '('('"_logical_id" '2028) '('"_id" '"f0a602ed-32d8342f-ac63d312-cad1c044") '('"_wide_channels" $10)))
(let $12 (DqPhyStage '($8) (lambda '($22) (block '(
  (let $23 (AggBlockApplyState '"count_all" $3 $3))
  (let $24 (WideTopSort (ToFlow (WideFromBlocks (BlockMergeFinalizeHashed $22 $7 '('($23 '2))))) $9 '('('2 (Bool 'false)))))
  (let $25 (lambda '($26 $27 $28) $28 $26 $27))
  (return (FromFlow (WideMap $24 $25)))
))) $11))
(let $13 (DqCnMerge (TDqOutput $12 '0) '('('0 '"Desc"))))
(let $14 (DqPhyStage '($13) (lambda '($29) (FromFlow (NarrowMap (Take (ToFlow $29) $9) (lambda '($30 $31 $32) (AsStruct '('"SearchPhrase" $31) '('"UserID" $32) '('"cnt" $30)))))) '('('"_logical_id" '2147) '('"_id" '"5b6d20a9-5dad2d41-cf7aafa7-8c03b6ed"))))
(let $15 '($6 $12 $14))
(let $16 '('"UserID" '"SearchPhrase" '"cnt"))
(let $17 (DqCnResult (TDqOutput $14 '0) $16))
(return (KqpPhysicalQuery '((KqpPhysicalTx $15 '($17) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType (StructType $1 $2 '('"cnt" $3))) '0 '0)) '('('"type" '"query"))))
)
