Move sql queries into file