view and sql