Add some SQL views to calculate simple stats on the dataset. Materialized views requires PostgreSQL 9.3