Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Schema initialization for QuestDB #47

Merged
merged 1 commit into from
Dec 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions setup_questdb_tables.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
-- Create stock_financials table
CREATE TABLE stock_financials (
ticker SYMBOL capacity 256 CACHE,
bookValue DOUBLE,
priceToBook DOUBLE,
trailingEPS DOUBLE,
promoterHolding DOUBLE,
priceToSales DOUBLE,
priceToEarnings DOUBLE,
close DOUBLE,
timestamp TIMESTAMP
) timestamp (timestamp) PARTITION BY DAY WAL;

-- Create stock_valuations table
CREATE TABLE stock_valuations (
TICKER SYMBOL capacity 256 CACHE,
VAP_BV DOUBLE,
VAP_SALES DOUBLE,
VAP_GRAHAM DOUBLE,
VAP_EARNINGS DOUBLE,
LTP DOUBLE,
timestamp TIMESTAMP,
STATUS STRING,
FAIR_VALUE DOUBLE
) timestamp (timestamp) PARTITION BY DAY WAL;
Loading