v2 for sql queries