created a query in my database so it can be called in one of the functions