(
(let $1 (OptionalType (DataType 'String)))
(let $2 '('0))
(let $3 (DataType 'Utf8))
(let $4 (DataType 'Double))
(let $5 (DataType 'Uint64))
(let $6 (TupleType $4 $5))
(let $7 '('key $1))
(let $8 (StructType '('_yql_agg_0 $6) '('_yql_agg_1 $5) '('_yql_agg_2 $3) $7))
(let $9 '('('"_logical_id" '6905) '('"_id" '"ed601df0-1cd5f048-42a97657-cf620101") '('"_wide_channels" $8)))
(let $10 (DqPhyStage '() (lambda '() (block '(
  (let $21 (KqpTable '"/local/test_db/olap_yatests/clickbench/hits" '"72075186224037897:8" '"" '1))
  (let $22 (KqpBlockReadOlapTableRanges $21 (Void) '('"Referer") '() '() (lambda '($26) (block '(
    (let $27 '('neq '"Referer" (String '"")))
    (return (KqpOlapFilter $26 $27))
  )))))
  (let $23 (lambda '($28) (block '(
    (let $29 '($1))
    (let $30 (CallableType '() $29 $29))
    (let $31 '('('"blocks")))
    (let $32 (Udf '"Url.CutWWW" (Void) (VoidType) '"" $30 (VoidType) '"" $31))
    (let $33 (Udf '"Url.GetHost" (Void) (VoidType) '"" $30 (VoidType) '"" $31))
    (return (Apply $32 (Apply $33 (Just (ToString $28)))) (Size $28) $28)
  ))))
  (let $24 '('((AggBlockApply 'avg (DataType 'Uint32)) '1) '((AggBlockApply 'count_all)) '((AggBlockApply 'min $3) '"2")))
  (let $25 (lambda '($34 $35 $36 $37 $38) $35 $36 $37 $34 $38))
  (return (FromFlow (WideMap (ToFlow (BlockCombineHashed (WideToBlocks (FromFlow (WideMap (ToFlow (WideFromBlocks (FromFlow $22))) $23))) (Void) $2 $24)) $25)))
))) $9))
(let $11 (DqCnHashShuffle (TDqOutput $10 '0) '('"3") '0 '"HashV1"))
(let $12 (Uint64 '25))
(let $13 (StructType '('"c" $5) '('"column3" $3) $7 '('"l" $4)))
(let $14 '('('"_logical_id" '9692) '('"_id" '"baf62457-7f336611-28f7afed-e50ef62a") '('"_wide_channels" $13)))
(let $15 (DqPhyStage '($11) (lambda '($39) (block '(
  (let $40 (lambda '($47 $48 $49 $50 $51) $50 $47 $48 $49 $51))
  (let $41 (AggBlockApplyState 'avg $4 $6))
  (let $42 (AggBlockApplyState 'count_all $5 $5))
  (let $43 (AggBlockApplyState 'min $3 $3))
  (let $44 '('($41 '1) '($42 '"2") '($43 '"3")))
  (let $45 (WideTopSort (WideFilter (ToFlow (WideFromBlocks (BlockMergeFinalizeHashed (FromFlow (WideMap (ToFlow $39) $40)) $2 $44))) (lambda '($52 $53 $54 $55) (> $54 (Int32 '"100000")))) $12 '('('1 (Bool 'false)))))
  (let $46 (lambda '($56 $57 $58 $59) $58 $59 $56 $57))
  (return (FromFlow (WideMap $45 $46)))
))) $14))
(let $16 (DqCnMerge (TDqOutput $15 '0) '('('"3" '"Desc"))))
(let $17 (DqPhyStage '($16) (lambda '($60) (FromFlow (NarrowMap (Take (ToFlow $60) $12) (lambda '($61 $62 $63 $64) (AsStruct '('"c" $61) '('"column3" $62) '('key $63) '('"l" $64)))))) '('('"_logical_id" '9705) '('"_id" '"3b0f0cba-dbbf8bd2-3da4c855-863e6ab0"))))
(let $18 '($10 $15 $17))
(let $19 '('key '"l" '"c" '"column3"))
(let $20 (DqCnResult (TDqOutput $17 '0) $19))
(return (KqpPhysicalQuery '((KqpPhysicalTx $18 '($20) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $13) '0 '0)) '('('"type" '"query"))))
)
