fixed sql structure