Fix sql tests