# Retrieve problems via DQL

**URL:** <https://community.dynatrace.com/t/retrieve-problems-via-dql/51459>\
**Category:** Dynatrace Tips\
**Tags:** dql, tips-and-tricks\
**Created:** [May 2, 2025, 1:24am UTC](https://community.dynatrace.com/t/retrieve-problems-via-dql/51459 "2025-05-02T01:24:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam\_gardner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/adam_gardner/32/20087_2.png) [@adam\_gardner](https://community.dynatrace.com/u/adam_gardner)\
**Post date:** [May 2, 2025, 1:24am UTC](https://community.dynatrace.com/t/retrieve-problems-via-dql/51459/1 "2025-05-02T01:24:28Z")

</div>

Just a quick tip that you can retrieve problems via DQL:

Here I’m filtering for problems that have been created in the last 30mins which contain `Critical Redis connection error!` in the title.

```auto
fetch events, from: now()-30m, to: now()<br>| filter event.kind == "DAVIS_PROBLEM"<br>| filter event.status_transition == "CREATED"<br>| filter matchesPhrase(event.name, "Critical Redis connection error!")

```

you can also do this in workflow tasks:

```auto
import { queryExecutionClient } from "@dynatrace-sdk/client-query";

const data = await queryExecutionClient.queryExecute({
  body: {
  query: 'fetch events, from: now()-30m, to: now() | filter event.kind == "DAVIS_PROBLEM" | filter event.status_transition == "CREATED" | filter matchesPhrase(event.name, "Critical Redis connection error!")',
  },
});

```
