Merged some tests for sql