Materialized view medicare.qc_enrollments
Overview for medicare.qc_enrollments
Aggregate data for beneficiaries and enrollments
Transformed from medicare.qc_enrl_bene
SQL/DDL Statement
CREATE materialized view medicare.qc_enrollments AS
SELECT
year,
state,
zip,
fips3,
orec,
curec,
hmo,
dual,
buyin,
consistent_dob,
consistent_dod,
consistent_sex,
consistent_race,
fips3_is_approximated,
fips3_valdiated,
MAX(state_iso) AS state_iso,
COUNT(*) AS NumRecords,
(#(hll_add_agg(bene)))::BIGINT AS NumDistinctBeneficaries,
hll_add_agg(bene) AS bene_hll
FROM medicare.qc_enrl_bene
GROUP BY year,state,zip,fips3,orec,curec,hmo,dual,buyin,consistent_dob,consistent_dod,consistent_sex,consistent_race,fips3_is_approximated,fips3_valdiated;
COMMENT ON materialized view medicare.qc_enrollments IS 'CREATED BY Dorieh: {"version": "0.2.3", "url": "https://github.com/NSAPH-Data-Platform/dorieh", "commit": "bf4644403297aaf478f6a42717508dde55da409a"}. Created at 2024-08-12 13:31:09.791842';
Columns:
Column Name |
Column Type |
Datatype |
---|---|---|
computed |
string |
|
string |
||
string |
||
string |
||
string |
||
string |
||
string |
||
string |
||
string |
||
string |
||
string |
||
string |
||
computed |
BIGINT |
|
computed |
BIGINT |
|
string |
||
string |
||
computed |
CHAR(5) |
|
string |
||
string |