add data analytics views and query function