-
Notifications
You must be signed in to change notification settings - Fork 93
/
StockMarketsMonthly.js
133 lines (107 loc) · 2.23 KB
/
StockMarketsMonthly.js
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
cube(`StockMarketsMonthly`, {
sql: `SELECT * FROM gold.stock_markets_monthly`,
preAggregations: {
// Pre-Aggregations definitions go here
// Learn more here: https://cube.dev/docs/caching/pre-aggregations/getting-started
},
joins: {
},
measures: {
count: {
type: `count`
},
volume: {
sql: `volume`,
title: `Volume [SUM]`,
type: `sum`
},
volume_avg: {
sql: `volume`,
title: `Volume [AVG]`,
type: `avg`
},
volume_min: {
sql: `volume`,
title: `Volume [MIN]`,
type: `min`
},
volume_max: {
sql: `volume`,
title: `Volume [MAX]`,
type: `max`
},
dividend: {
sql: `dividend`,
title: `Dividend [SUM]`,
type: `sum`
},
dividend_avg: {
sql: `dividend`,
title: `Dividend [AVG]`,
type: `avg`
},
dividend_min: {
sql: `dividend`,
title: `Dividend [MIN]`,
type: `min`
},
dividend_max: {
sql: `dividend`,
title: `Dividend [MAX]`,
type: `max`
},
price_high: {
sql: `price_high`,
title: `Price High [MAX]`,
type: `max`
},
price_low: {
sql: `price_low`,
title: `Price Low [MIN]`,
type: `min`
},
price_open_avg: {
sql: `price_open`,
title: `Price Open [AVG]`,
type: `avg`
},
price_close_avg: {
sql: `price_close`,
title: `Price Close [AVG]`,
type: `avg`
},
price_high_relative: {
sql: `price_high_relative`,
title: `Relative Price High [MAX]`,
type: `max`
},
price_low_relative: {
sql: `price_low_relative`,
title: `Relative Price Low [MIN]`,
type: `min`
},
price_open_relative_avg: {
sql: `price_open_relative`,
title: `Relative Price Open [AVG]`,
type: `avg`
},
price_close_relative_avg: {
sql: `price_close_relative`,
title: `Relative Price Close [AVG]`,
type: `avg`
}
},
dimensions: {
symbol: {
sql: `symbol`,
title: `Symbol`,
type: `string`
},
dt: {
sql: `dt`,
title: `Date`,
type: `time`
}
},
dataSource: `default`
});