(
(let $1 '('"ClientIP" (DataType 'Int32)))
(let $2 (DataType 'Int64))
(let $3 '('"WatchID" $2))
(let $4 (DataType 'Double))
(let $5 (DataType 'Uint64))
(let $6 (TupleType $4 $5))
(let $7 (StructType $1 $3 '('_yql_agg_0 $6) '('_yql_agg_1 $5) '('_yql_agg_2 $2)))
(let $8 '('('"_logical_id" '3338) '('"_id" '"f2b9b1f9-1071a4f3-d5227ac7-832bcd45") '('"_wide_channels" $7)))
(let $9 (DqPhyStage '() (lambda '() (block '(
  (let $21 (KqpTable '"/local/test_db/olap_yatests/clickbench/hits" '"72075186224037897:8" '"" '1))
  (let $22 '('"ClientIP" '"IsRefresh" '"ResolutionWidth" '"SearchPhrase" '"WatchID"))
  (let $23 (KqpBlockReadOlapTableRanges $21 (Void) $22 '() '() (lambda '($25) (block '(
    (let $26 '('neq '"SearchPhrase" (String '"")))
    (let $27 '('"ClientIP" '"IsRefresh" '"ResolutionWidth" '"WatchID"))
    (let $28 '('"_yql_agg_0_sum" 'sum '"ResolutionWidth"))
    (let $29 '('"_yql_agg_0_cnt" '"count" '"ResolutionWidth"))
    (let $30 '('_yql_agg_1 '"count" '"*"))
    (let $31 '('_yql_agg_2 'sum '"IsRefresh"))
    (let $32 '($28 $29 $30 $31))
    (return (TKqpOlapAgg (TKqpOlapExtractMembers (KqpOlapFilter $25 $26) $27) $32 '('"ClientIP" '"WatchID")))
  )))))
  (let $24 (lambda '($33 $34 $35 $36 $37 $38) $33 $34 '((Convert $36 'Double) $35) $37 $38))
  (return (FromFlow (WideMap (ToFlow (WideFromBlocks (FromFlow $23))) $24)))
))) $8))
(let $10 '('0 '1))
(let $11 (DqCnHashShuffle (TDqOutput $9 '0) $10 '0 '"HashV1"))
(let $12 (Uint64 '10))
(let $13 (StructType '('Avg0 $4) $1 '('Count0 $5) '('Sum0 $2) $3))
(let $14 '('('"_logical_id" '5134) '('"_id" '"b75439b7-ce10571-1903e05c-610dc1db") '('"_wide_channels" $13)))
(let $15 (DqPhyStage '($11) (lambda '($39) (block '(
  (let $40 (AggBlockApplyState '"avg" $4 $6))
  (let $41 (AggBlockApplyState '"count_all" $5 $5))
  (let $42 (AggBlockApplyState 'sum $2 $2))
  (let $43 '('($40 '"2") '($41 '3) '($42 '"4")))
  (let $44 (WideTopSort (ToFlow (WideFromBlocks (BlockMergeFinalizeHashed (WideToBlocks $39) $10 $43))) $12 '('('3 (Bool 'false)))))
  (let $45 (lambda '($46 $47 $48 $49 $50) $48 $46 $49 $50 $47))
  (return (FromFlow (WideMap $44 $45)))
))) $14))
(let $16 (DqCnMerge (TDqOutput $15 '0) '('('"2" '"Desc"))))
(let $17 (DqPhyStage '($16) (lambda '($51) (FromFlow (NarrowMap (Take (ToFlow $51) $12) (lambda '($52 $53 $54 $55 $56) (AsStruct '('"ClientIP" $53) '('"WatchID" $56) '('"c" $54) '('"column3" $55) '('"column4" $52)))))) '('('"_logical_id" '5261) '('"_id" '"114b5122-a54cabb0-22d663b2-bf2017b5"))))
(let $18 '($9 $15 $17))
(let $19 '('"WatchID" '"ClientIP" '"c" '"column3" '"column4"))
(let $20 (DqCnResult (TDqOutput $17 '0) $19))
(return (KqpPhysicalQuery '((KqpPhysicalTx $18 '($20) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType (StructType $1 $3 '('"c" $5) '('"column3" $2) '('"column4" $4))) '0 '0)) '('('"type" '"query"))))
)
