added the query as well as an example database configuration.