     SFUNC = agg_first,
     STYPE = anyarray,
     INITCOND = '{}'
+);
+
+
+SET default_with_oids = false;
+
+--
+-- Name: annual_range; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE annual_range (
+    year smallint NOT NULL,
+    range daterange NOT NULL
 );
 
 



--
-- Name: disposals_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--


                    d.out_transaction_id,
                    d.disposed_shares,
                    d.disposed
                   FROM ((disposals d
                     JOIN transactions tout ON ((d.out_transaction_id = tout.transaction_id)))
                     JOIN annual_range ar_1 ON (((ar_1.range @> tout.date) AND (ar_1.year = (date_part('year'::text, ('now'::text)::date))::smallint))))
                ), annual_transactions AS (
                 SELECT annual_disposals.in_transaction_id AS transaction_id
                   FROM annual_disposals
