Working in the basic sql queries generation