fixed sql view