Added a necessary include directory
Put the SQL stuff into a library
Called the SQL function from the test executable