-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.sql
100 lines (95 loc) · 2.55 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
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
CREATE TABLE Sales
(
sale_id UInt64,
trx_id String,
seller String,
asset_ids Array(UInt64),
offer_id Int64,
listing_price_amount Int64,
listing_price_precision UInt8,
listing_price_symcode String,
settlement_symbol_precision UInt8,
settlement_symbol_code String,
maker_marketplace String,
collection_name String,
collection_fee Float64,
)
ENGINE = ReplacingMergeTree
PRIMARY KEY (sale_id)
ORDER BY (sale_id, collection_name, listing_price_symcode, trx_id);
CREATE TABLE AnnounceSales
(
trx_id String,
seller String,
asset_ids Array(UInt64),
listing_price_amount Int64,
listing_price_precision UInt8,
listing_price_symcode String,
settlement_symbol_precision UInt8,
settlement_symbol_code String,
maker_marketplace String,
)
ENGINE = ReplacingMergeTree
PRIMARY KEY (trx_id)
ORDER BY (trx_id, listing_price_symcode, maker_marketplace, seller);
CREATE TABLE AnnounceAuctions
(
trx_id String,
seller String,
asset_ids Array(UInt64),
starting_bid_amount Int64,
starting_bid_precision UInt8,
starting_bid_symcode String,
duration UInt32,
maker_marketplace String,
)
ENGINE = ReplacingMergeTree
PRIMARY KEY (trx_id)
ORDER BY (trx_id, starting_bid_symcode, maker_marketplace, seller);
CREATE TABLE NewBuyOffers
(
buyoffer_id UInt64,
trx_id String,
buyer String,
recipient String,
price_amount Int64,
price_precision UInt8,
price_symcode String,
asset_ids Array(UInt64),
memo String,
maker_marketplace String,
collection_name String,
collection_fee Float64,
)
ENGINE = ReplacingMergeTree
PRIMARY KEY (buyoffer_id)
ORDER BY (buyoffer_id, collection_name, price_symcode, trx_id);
CREATE TABLE NewSales
(
sale_id UInt64,
trx_id String,
seller String,
asset_ids Array(UInt64),
listing_price_amount Int64,
listing_price_precision UInt8,
listing_price_symcode String,
settlement_symbol_precision UInt8,
settlement_symbol_code String,
maker_marketplace String,
collection_name String,
collection_fee Float64,
)
ENGINE = ReplacingMergeTree
PRIMARY KEY (sale_id)
ORDER BY (sale_id, collection_name, listing_price_symcode, trx_id);
CREATE TABLE PurchaseSales
(
sale_id UInt64,
trx_id String,
buyer String,
intended_delphi_median UInt64,
taker_marketplace String,
)
ENGINE = ReplacingMergeTree
PRIMARY KEY (sale_id)
ORDER BY (sale_id, taker_marketplace, trx_id);