lots of sql for tests