(
(declare %kqp%tx_result_binding_0_0 (TupleType (ListType (TupleType (TupleType (OptionalType (DataType 'Int32)) (OptionalType (DataType 'Date32)) (OptionalType (DataType 'Int64)) (OptionalType (DataType 'Timestamp64)) (OptionalType (DataType 'Int64)) (DataType 'Int32)) (TupleType (OptionalType (DataType 'Int32)) (OptionalType (DataType 'Date32)) (OptionalType (DataType 'Int64)) (OptionalType (DataType 'Timestamp64)) (OptionalType (DataType 'Int64)) (DataType 'Int32))))))
(let $1 (DataType 'Date32))
(let $2 (OptionalType $1))
(let $3 (Int32 '0))
(let $4 (OptionalType (DataType 'Int64)))
(let $5 (OptionalType (DataType 'Timestamp64)))
(let $6 '('('"_logical_id" '3547) '('"_id" '"cfaff107-a0156a30-68cfee6e-3a9cabf7") '('"_partition_mode" '"single")))
(let $7 (DqPhyStage '() (lambda '() (block '(
  (let $35 (Uint64 '10000))
  (let $36 (Int32 '1))
  (let $37 '((Just (Int32 '"62")) $36))
  (let $38 '((Nothing $2) $3))
  (let $39 (RangeMultiply $35 (RangeCreate (AsList '($37 $37))) (RangeIntersect (RangeCreate (AsList '('((Just (SafeCast (Date '"15887") $1)) $36) $38))) (RangeCreate (AsList '($38 '((Just (SafeCast (Date '"15917") $1)) $36)))))))
  (let $40 (Nothing $4))
  (let $41 '($40 (Nothing $5) $40 $3))
  (return (ToStream (Just '((RangeFinalize (RangeMultiply $35 (RangeUnion (RangeMultiply $35 $39 (RangeCreate (AsList '($41 $41)))))))))))
))) $6))
(let $8 (DqCnValue (TDqOutput $7 '0)))
(let $9 (KqpPhysicalTx '($7) '($8) '() '('('"type" '"compute"))))
(let $10 '"%kqp%tx_result_binding_0_0")
(let $11 (DataType 'Int32))
(let $12 (TupleType (OptionalType $11) $2 $4 $5 $4 $11))
(let $13 (TupleType (ListType (TupleType $12 $12))))
(let $14 '"WindowClientHeight")
(let $15 '"WindowClientWidth")
(let $16 (DataType 'Int16))
(let $17 '($14 $16))
(let $18 '($15 $16))
(let $19 (DataType 'Uint64))
(let $20 (StructType $17 $18 '('_yql_agg_0 $19)))
(let $21 '('('"_logical_id" '3836) '('"_id" '"22db6d22-1d6dd121-448c868b-7b083022") '('"_wide_channels" $20)))
(let $22 (DqPhyStage '() (lambda '() (block '(
  (let $42 (KqpTable '"/local/test_db/olap_yatests/clickbench/hits" '"72075186224037897:8" '"" '1))
  (let $43 '('"DontCountHits" '"IsRefresh" '"URLHash" $14 $15))
  (let $44 '('('"UsedKeyColumns" '('"CounterID" '"EventDate")) '('"ExpectedMaxRanges" '1) '('"PointPrefixLen" '1)))
  (let $45 (KqpBlockReadOlapTableRanges $42 %kqp%tx_result_binding_0_0 $43 '() $44 (lambda '($47) (block '(
    (let $48 '('eq '"IsRefresh" $3))
    (let $49 '('eq '"DontCountHits" $3))
    (let $50 '('eq '"URLHash" (Int64 '"2868770270353813622")))
    (let $51 (KqpOlapAnd $48 $49 $50))
    (let $52 '($14 $15))
    (return (TKqpOlapAgg (TKqpOlapExtractMembers (KqpOlapFilter $47 $51) $52) '('('_yql_agg_0 '"count" '"*")) $52))
  )))))
  (let $46 (lambda '($53 $54 $55 $56) (block '(
    (let $57 (BlockAsStruct '($14 $53) '($15 $54) '('_yql_agg_0 $55)))
    (return (BlockMember $57 $14) (BlockMember $57 $15) (BlockMember $57 '_yql_agg_0) $56)
  ))))
  (return (FromFlow (WideMap $45 $46)))
))) $21))
(let $23 (DqCnHashShuffle (TDqOutput $22 '0) '('0 '1)))
(let $24 (Uint64 '10))
(let $25 (StructType '('Count0 $19) $17 $18))
(let $26 '('('"_logical_id" '4244) '('"_id" '"25b5feb3-7356321f-a540b766-53a52e8") '('"_wide_channels" $25)))
(let $27 (DqPhyStage '($23) (lambda '($58) (block '(
  (let $59 (lambda '($62 $63 $64) $62 $63))
  (let $60 (lambda '($76 $77 $78) $78 $76 $77))
  (let $61 (WideCombiner (ToFlow (WideFromBlocks $58)) '"" $59 (lambda '($65 $66 $67 $68 $69) $69) (lambda '($70 $71 $72 $73 $74 $75) (AggrAdd $74 $75)) $60))
  (return (FromFlow (WideTopSort $61 $24 '('('0 (Bool 'false))))))
))) $26))
(let $28 (DqCnMerge (TDqOutput $27 '0) '('('0 '"Desc"))))
(let $29 (DqPhyStage '($28) (lambda '($79) (FromFlow (NarrowMap (Take (ToFlow $79) $24) (lambda '($80 $81 $82) (AsStruct '('"PageViews" $80) '($14 $81) '($15 $82)))))) '('('"_logical_id" '4345) '('"_id" '"6a2e3937-80f3cc14-1622da15-ada24a3d"))))
(let $30 '($22 $27 $29))
(let $31 '($15 $14 '"PageViews"))
(let $32 (DqCnResult (TDqOutput $29 '0) $31))
(let $33 (KqpTxResultBinding $13 '0 '0))
(let $34 (KqpPhysicalTx $30 '($32) '('($10 $33)) '('('"type" '"generic"))))
(return (KqpPhysicalQuery '($9 $34) '((KqpTxResultBinding (ListType (StructType '('"PageViews" $19) $17 $18)) '1 '0)) '('('"type" '"query"))))
)
