fixed sql tests