Repository navigation
Expand file tree
/
Copy path03.sql
More file actions
114 lines (107 loc) · 2.75 KB
/
Copy path03.sql
File metadata and controls
114 lines (107 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
-- $ID$
-- TPC-H/TPC-R Shipping Priority Query (Q3)
-- Functional Query Definition
-- Approved February 1998
:x
:o
select
l_orderkey,
sum(l_extendedprice * (1 - l_discount)) as revenue,
o_orderdate,
o_shippriority
from
customer,
orders,
lineitem
where
c_mktsegment = ':1'
and c_custkey = o_custkey
and l_orderkey = o_orderkey
and o_orderdate < date ':2'
and l_shipdate > date ':2'
group by
l_orderkey,
o_orderdate,
o_shippriority
order by
revenue desc,
o_orderdate;
:n 10
select
l_orderkey,
o_orderdate
from
customer,
orders,
lineitem
where
c_mktsegment = 'AUTOMOBILE'
and c_custkey = o_custkey
and l_orderkey = o_orderkey
and o_orderdate < '1995-01-01'
and l_shipdate > '1995-01-01'
GetTokensByCompare
DDN = ?
BOP = EQ
Arg32 = 'AUTOMOBILE'
COP32 = AND
SendStackToArg32
RSP = PREV-0
GetColumnRowsByIndexCompare (c_mktsegment = 'AUTOMOBILE')
TCN = 1 (customer.c_mktsegment)
SCN = 1
BOP = OR
Arg32 = PREV-0
COP32 = EQ
RRI = 1
GetColumnRowsByOffset
SCN = 1
TCN = 2 (customer.c_custkey)
RSPwRID = PREV-0
SendStackToArg32
RSP = PREV-0
GetColumnRowsByIndexCompare (c_custkey = o_custkey)
TCN = 8 (orders.o_custkey)
SCN = 1
BOP = OR
Arg32 = PREV-0
COP32 = EQ
RRI = 1
FiterResultStacksByColumn
RSP1 = PREV-2
RSP2 = PREV-0
FilterResultStacksByRID
RSP1 = PREV-4
RSP2 = PREV-0
GetColumnRowsByOffset
SCN = 1
TCN = 9 (order.o_orderkey)
RSPwRID = PREV-0
SendStackToArg32
RSP = PREV-0
GetColumnRowsByIndexCompare (l_orderkey = o_orderkey)
TCN = 15 (lineitem.l_orderkey)
SCN = 1
BOP = OR
Arg32 = PREV-0
COP32 = EQ
RRI = 1
FilterResultStacksByRID
RSP1 = PREV-3
RSP2 = PREV-0
GetColumnRowsByOffset
SCN = 1
TCN = 10 (order.o_orderdate)
RSPwRID = PREV-0
SendStackToArg32
RSP = PREV-0
??? filter o_orderdate < '1995-01-01' from previous stack
??? filter l_shipdate > '1995-01-01' from previous stack
GetColumnRowsByOffset
TCN = 15 (l_orderkey)
SCN = 1
RSPwRID = PREV-0
GetColumnRowsByOffset
TCN = 10 (o_orderdate)
SCN = 1
RSPwRID = PREV-0