(
(let $1 '('0))
(let $2 '('"CounterID" (DataType 'Int32)))
(let $3 (DataType 'Double))
(let $4 (DataType 'Uint64))
(let $5 (TupleType $3 $4))
(let $6 (StructType $2 '('_yql_agg_0 $5) '('_yql_agg_1 $4)))
(let $7 '('('"_logical_id" '3194) '('"_id" '"a45ecee4-35f74fbd-c05105ce-a69ff20a") '('"_wide_channels" $6)))
(let $8 (DqPhyStage '() (lambda '() (block '(
  (let $19 (KqpTable '"/local/test_db/olap_yatests/clickbench/hits" '"72075186224037897:8" '"" '1))
  (let $20 (KqpBlockReadOlapTableRanges $19 (Void) '('"CounterID" '"URL") '() '() (lambda '($22) (block '(
    (let $23 '('neq '"URL" (String '"")))
    (return (KqpOlapFilter $22 $23))
  )))))
  (let $21 (lambda '($24 $25) $24 (Size $25)))
  (return (BlockCombineHashed (WideToBlocks (FromFlow (WideMap (ToFlow (WideFromBlocks (FromFlow $20))) $21))) (Void) $1 '('((AggBlockApply 'avg (DataType 'Uint32)) '1) '((AggBlockApply 'count_all)))))
))) $7))
(let $9 (DqCnHashShuffle (TDqOutput $8 '0) $1 '0 '"HashV1"))
(let $10 (Uint64 '25))
(let $11 (StructType $2 '('"c" $4) '('"l" $3)))
(let $12 '('('"_logical_id" '5814) '('"_id" '"f53fcdaa-bb426f8-4be6141-34c94a34") '('"_wide_channels" $11)))
(let $13 (DqPhyStage '($9) (lambda '($26) (block '(
  (let $27 (AggBlockApplyState 'avg $3 $5))
  (let $28 (AggBlockApplyState 'count_all $4 $4))
  (let $29 (WideTopSort (WideFilter (ToFlow (WideFromBlocks (BlockMergeFinalizeHashed $26 $1 '('($27 '1) '($28 '"2"))))) (lambda '($31 $32 $33) (> $33 (Int32 '"100000")))) $10 '('('1 (Bool 'false)))))
  (let $30 (lambda '($34 $35 $36) $34 $36 $35))
  (return (FromFlow (WideMap $29 $30)))
))) $12))
(let $14 (DqCnMerge (TDqOutput $13 '0) '('('"2" '"Desc"))))
(let $15 (DqPhyStage '($14) (lambda '($37) (FromFlow (NarrowMap (Take (ToFlow $37) $10) (lambda '($38 $39 $40) (AsStruct '('"CounterID" $38) '('"c" $39) '('"l" $40)))))) '('('"_logical_id" '5827) '('"_id" '"92281f6f-19606845-16eef9d5-a3cec08f"))))
(let $16 '($8 $13 $15))
(let $17 '('"CounterID" '"l" '"c"))
(let $18 (DqCnResult (TDqOutput $15 '0) $17))
(return (KqpPhysicalQuery '((KqpPhysicalTx $16 '($18) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $11) '0 '0)) '('('"type" '"query"))))
)
