Added a function to query all the views