DROP TABLE IF EXISTS stock_price;
-- DROP TABLE IF EXISTS stock_price_tw;
-- DROP TABLE IF EXISTS stock_info;
-- DROP TABLE IF EXISTS stock_info_tw;

CREATE TABLE stock_price (
    id SERIAL PRIMARY KEY,
    ticker VARCHAR(64) NOT NULL,
    date DATE NOT NULL,
    price REAL NOT NULL,
    return 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(64) NOT NULL,
--     date DATE NOT NULL,
--     price REAL NOT NULL,
--     return REAL NOT NULL
-- );
-- -- you need to add ()
-- CREATE INDEX idx_ticker_tw ON stock_price_tw (ticker);

-- CREATE TABLE stock_info_tw (
--     id SERIAL PRIMARY KEY,
--     ticker VARCHAR(64) NOT NULL,
--     last_price REAL NOT NULL,
--     start DATE NOT NULL,
--     end DATE NOT NULL
-- );
-- you need to add ()
-- CREATE INDEX idx_info_tw ON stock_info_tw (ticker);

-- CREATE TABLE stock_info (
--     id SERIAL PRIMARY KEY,
--     ticker VARCHAR(64) NOT NULL,
--     last_price REAL NOT NULL,
--     start DATE NOT NULL,
--     end DATE NOT NULL
-- );
-- you need to add ()
-- CREATE INDEX idx_info ON stock_info (ticker);