投資組合大擂台 Ver. 2
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

21 lines
501 B

DROP TABLE IF EXISTS stock_price;
DROP TABLE IF EXISTS stock_price_tw;
CREATE TABLE stock_price (
id SERIAL PRIMARY KEY,
ticker VARCHAR(32) NOT NULL,
date DATE NOT NULL,
price REAL NOT NULL
);
-- you need to add ()
CREATE INDEX idx_ticker ON stock_price (ticker);
CREATE TABLE stock_price_tw (
id SERIAL PRIMARY KEY,
ticker VARCHAR(32) NOT NULL,
date DATE NOT NULL,
price REAL NOT NULL
);
-- you need to add ()
CREATE INDEX idx_ticker_tw ON stock_price_tw (ticker);