Started to manage sql queries