edited view.sql