Creating a custom query.