-- Sharadar table schema: holdings (PostgreSQL) -- As of 2026-08-02 -- https://api.sharadar.com/v1.0/schema/holdings?format=postgres CREATE TABLE IF NOT EXISTS holdings ( ticker text NOT NULL, investorname text NOT NULL, securitytype text NOT NULL, date date NOT NULL, value double precision, units double precision, PRIMARY KEY (ticker, investorname, securitytype, date) ); CREATE INDEX IF NOT EXISTS holdings_date_idx ON public.holdings USING btree (date); CREATE INDEX IF NOT EXISTS holdings_investorname_idx ON public.holdings USING btree (investorname); CREATE INDEX IF NOT EXISTS holdings_securitytype_idx ON public.holdings USING btree (securitytype);