This examples shows how to connect and query a SQL database to retrieve records based on the given input parameter and return the results as a JSON.