Fixed query method and now mysql passes SQL unit test.