(
(let $1 '('"ClientIP" (DataType 'Int32)))
(let $2 '('"SearchEngineID" (DataType 'Int16)))
(let $3 (DataType 'Double))
(let $4 (DataType 'Uint64))
(let $5 (DataType 'Int64))
(let $6 (StructType $1 $2 '('_yql_agg_0 (TupleType $3 $4)) '('_yql_agg_1 $4) '('_yql_agg_2 $5)))
(let $7 '('('"_logical_id" '3337) '('"_id" '"8fdbf82c-9d726337-16bc6390-a1d609ae") '('"_wide_channels" $6)))
(let $8 (DqPhyStage '() (lambda '() (block '(
  (let $19 (KqpTable '"/local/test_db/olap_yatests/clickbench/hits" '"72075186224037897:8" '"" '1))
  (let $20 '('"ClientIP" '"IsRefresh" '"ResolutionWidth" '"SearchEngineID" '"SearchPhrase"))
  (let $21 (KqpBlockReadOlapTableRanges $19 (Void) $20 '() '() (lambda '($24) (block '(
    (let $25 '('neq '"SearchPhrase" (String '"")))
    (let $26 '('"ClientIP" '"IsRefresh" '"ResolutionWidth" '"SearchEngineID"))
    (let $27 '('"_yql_agg_0_sum" 'sum '"ResolutionWidth"))
    (let $28 '('"_yql_agg_0_cnt" '"count" '"ResolutionWidth"))
    (let $29 '('_yql_agg_1 '"count" '"*"))
    (let $30 '('_yql_agg_2 'sum '"IsRefresh"))
    (let $31 '($27 $28 $29 $30))
    (return (TKqpOlapAgg (TKqpOlapExtractMembers (KqpOlapFilter $24 $25) $26) $31 '('"ClientIP" '"SearchEngineID")))
  )))))
  (let $22 (lambda '($32 $33 $34 $35 $36 $37 $38) (block '(
    (let $39 (BlockAsStruct '('"ClientIP" $32) '('"SearchEngineID" $33) '('"_yql_agg_0_cnt" $34) '('"_yql_agg_0_sum" $35) '('_yql_agg_1 $36) '('_yql_agg_2 $37)))
    (return (BlockMember $39 '"ClientIP") (BlockMember $39 '"SearchEngineID") (BlockMember $39 '"_yql_agg_0_sum") (BlockMember $39 '"_yql_agg_0_cnt") (BlockMember $39 '_yql_agg_1) (BlockMember $39 '_yql_agg_2) $38)
  ))))
  (let $23 (lambda '($40 $41 $42 $43 $44 $45) $40 $41 '((Convert $42 'Double) $43) $44 $45))
  (return (FromFlow (WideMap (ToFlow (WideFromBlocks (FromFlow (WideMap $21 $22)))) $23)))
))) $7))
(let $9 (DqCnHashShuffle (TDqOutput $8 '0) '('0 '1)))
(let $10 (Uint64 '10))
(let $11 (StructType '('Avg0 $3) $1 '('Count0 $4) $2 '('Sum0 $5)))
(let $12 '('('"_logical_id" '5194) '('"_id" '"ee6afd8c-7643740-e858aab5-b034c08") '('"_wide_channels" $11)))
(let $13 (DqPhyStage '($9) (lambda '($46) (block '(
  (let $47 (lambda '($52 $53 $54 $55 $56) $52 $53))
  (let $48 (lambda '($57 $58 $59 $60 $61 $62 $63) (Nth $61 '0) (Nth $61 '1) $62 $63))
  (let $49 (lambda '($64 $65 $66 $67 $68 $69 $70 $71 $72 $73 $74) (AggrAdd (Nth $68 '0) $71) (AggrAdd (Nth $68 '1) $72) (AggrAdd $69 $73) (AggrAdd $70 $74)))
  (let $50 (lambda '($75 $76 $77 $78 $79 $80) (Div $77 $78) $75 $79 $76 $80))
  (let $51 (WideCombiner (ToFlow $46) '"" $47 $48 $49 $50))
  (return (FromFlow (WideTopSort $51 $10 '('('2 (Bool 'false))))))
))) $12))
(let $14 (DqCnMerge (TDqOutput $13 '0) '('('2 '"Desc"))))
(let $15 (DqPhyStage '($14) (lambda '($81) (FromFlow (NarrowMap (Take (ToFlow $81) $10) (lambda '($82 $83 $84 $85 $86) (AsStruct '('"ClientIP" $83) '('"SearchEngineID" $85) '('"c" $84) '('"column3" $86) '('"column4" $82)))))) '('('"_logical_id" '5303) '('"_id" '"5cad0a68-e77a55e3-ab2e84da-9240bebd"))))
(let $16 '($8 $13 $15))
(let $17 '('"SearchEngineID" '"ClientIP" '"c" '"column3" '"column4"))
(let $18 (DqCnResult (TDqOutput $15 '0) $17))
(return (KqpPhysicalQuery '((KqpPhysicalTx $16 '($18) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType (StructType $1 $2 '('"c" $4) '('"column3" $5) '('"column4" $3))) '0 '0)) '('('"type" '"query"))))
)
