Skip to content

Instantly share code, notes, and snippets.

@bnsheehy
Last active December 1, 2021 00:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bnsheehy/1dad68b5e88ac92c1ef52f53a44c916a to your computer and use it in GitHub Desktop.
Save bnsheehy/1dad68b5e88ac92c1ef52f53a44c916a to your computer and use it in GitHub Desktop.
CREATE TABLE IF NOT EXISTS `price_data_historical` (
`key_id` varchar(30) NOT NULL PRIMARY KEY,
`ticker` varchar(8) NOT NULL,
`figi` varchar(14) NOT NULL,
`date` datetime NOT NULL,
`open` float NULL,
`high` float NULL,
`low` float NULL,
`close` float NULL,
`volume` float NULL,
`adj_open` float NULL,
`adj_high` float NULL,
`adj_low` float NULL,
`adj_close` float NULL,
`adj_volume` float NULL,
`split_ratio` float NULL,
`adj_factor` float NULL,
`change` float NULL,
`percent_change` float NULL,
`fifty_two_week_high` float NULL,
`fifty_two_week_low` float NULL,
`market_cap` bigint NULL,
`weighted_avg_shares_out` bigint NULL,
`intraperiod` boolean NOT NULL DEFAULT 0,
`last_updated_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`last_corp_action_date` timestamp NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment