Working on auto-complete based on sql queries