adjusted inputs sql