Fixed database query, added anonymous function and passed in query. Now add iteration logic within ejs to iterate through all the completed records recieved and display them in their own table row