-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocs.aggr-functions.sql
More file actions
65 lines (50 loc) · 2.17 KB
/
procs.aggr-functions.sql
File metadata and controls
65 lines (50 loc) · 2.17 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
-- FIDATA. Open-source system for analysis of financial and economic data
-- Copyright © 2012-2013 Basil Peace
/*
This file is part of FIDATA.
FIDATA is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
FIDATA is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with FIDATA. If not, see <http://www.gnu.org/licenses/>.
*/
-------------------------------------------------------------------------------
-- AGGREGATING FUNCTIONS --
-------------------------------------------------------------------------------
INSERT INTO procs.procs (name, proc_type, dbms_proc_namespace, dbms_proc, input_field_class, output_type, description) VALUES
('open', 'aggr_func', NULL, 'first', 'Flows', NULL, ''),
('high', 'aggr_func', NULL, 'max', 'Flows', NULL, ''),
('low', 'aggr_func', NULL, 'min', 'Flows', NULL, ''),
('close', 'aggr_func', NULL, 'last', 'Flows', NULL, ''),
('number', 'aggr_func', NULL, 'count', 'Stocks', 'pieces', ''),
('sum', 'aggr_func', NULL, 'sum', 'Stocks', NULL, '')
;
INSERT INTO procs.proc_input_scales (proc, scale) VALUES
('open', 'Time' ),
('open', 'Ordinal' ),
('open', 'Interval'),
('open', 'Ratio' ),
('open', 'Absolute'),
('high', 'Ordinal' ),
('high', 'Interval'),
('high', 'Ratio' ),
('high', 'Absolute'),
('low', 'Ordinal' ),
('low', 'Interval'),
('low', 'Ratio' ),
('low', 'Absolute'),
('close', 'Time' ),
('close', 'Ordinal' ),
('close', 'Interval'),
('close', 'Ratio' ),
('close', 'Absolute'),
-- 'number' has no input
('sum', 'Ratio'),
('sum', 'Absolute')
;
-------------------------------------------------------------------------------