-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.sql
48 lines (42 loc) · 1.16 KB
/
schema.sql
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
CREATE TABLE IF NOT EXISTS "blockchain_overview"."binance_spot_klines_5m" (
"id" BIGSERIAL NOT NULL,
"open_time" bigint NOT NULL,
"open_datetime" timestamp NOT NULL,
"pair" text,
"open" numeric,
"high" numeric,
"low" numeric,
"close" numeric,
"volume" numeric,
"close_time" bigint NOT NULL,
"close_datetime" timestamp NOT NULL,
"quote_asset_volume" numeric,
"num_of_trades" bigint,
"taker_buy_base_asset_volume" numeric,
"taker_buy_quote_asset_volume" numeric,
"candle_range" text,
"url" text,
"last_updated" timestamp,
PRIMARY KEY ("pair", "open_time", "candle_range")
);
CREATE TABLE IF NOT EXISTS "blockchain_overview"."binance_spot_klines_4h" (
"id" BIGSERIAL NOT NULL,
"open_time" bigint NOT NULL,
"open_datetime" timestamp NOT NULL,
"pair" text,
"open" numeric,
"high" numeric,
"low" numeric,
"close" numeric,
"volume" numeric,
"close_time" bigint NOT NULL,
"close_datetime" timestamp NOT NULL,
"quote_asset_volume" numeric,
"num_of_trades" bigint,
"taker_buy_base_asset_volume" numeric,
"taker_buy_quote_asset_volume" numeric,
"candle_range" text,
"url" text,
"last_updated" timestamp,
PRIMARY KEY ("pair", "open_time", "candle_range")
);