CGI interview question

var input= "google"; // output=go SQL -group by question