# DQL

**URL:** https://community.dynatrace.com/c/platform/dql/83.md?page=27

[Latest](https://community.dynatrace.com/latest.md) · [Categories](https://community.dynatrace.com/categories.md) · [Tags](https://community.dynatrace.com/tags.md)

**Page:** 28

---

## [How to compare outputs of two DQL?](https://community.dynatrace.com/t/how-to-compare-outputs-of-two-dql/40174)

<div class="topic-metadata">

**Author:** [@amita](https://community.dynatrace.com/u/amita)\
**Replies:** 4\
**Last updated:** [June 15, 2023, 7:32am UTC](https://community.dynatrace.com/t/how-to-compare-outputs-of-two-dql/40174 "2023-06-15T07:32:24Z")

</div>

We have two DQL and want to compare both the outputs in single format. Unable to find suitable option. Please do suggest.

---

## [DQL materials](https://community.dynatrace.com/t/dql-materials/40121)

<div class="topic-metadata">

**Author:** [@priyaganguly](https://community.dynatrace.com/u/priyaganguly)\
**Replies:** 3\
**Last updated:** [June 8, 2023, 9:07am UTC](https://community.dynatrace.com/t/dql-materials/40121 "2023-06-08T09:07:53Z")

</div>

Is there a cheat sheet for DQL queries please?

---

## [DQL too much data read message](https://community.dynatrace.com/t/dql-too-much-data-read-message/40043)

<div class="topic-metadata">

**Author:** [@sivart\_89](https://community.dynatrace.com/u/sivart_89)\
**Replies:** 1\
**Last updated:** [June 5, 2023, 8:06am UTC](https://community.dynatrace.com/t/dql-too-much-data-read-message/40043 "2023-06-05T08:06:43Z")

</div>

Is there any way to get around the below message without limiting my results and making multiple queries? My dql is below, we have 2.75k hosts in that mgmt zone. The lookup command’s subquery read too much data. Please …

---

## [Use the negation operator in DPL](https://community.dynatrace.com/t/use-the-negation-operator-in-dpl/40022)

<div class="topic-metadata">

**Author:** [@educampver](https://community.dynatrace.com/u/educampver)\
**Replies:** 1\
**Last updated:** [June 1, 2023, 10:59am UTC](https://community.dynatrace.com/t/use-the-negation-operator-in-dpl/40022 "2023-06-01T10:59:09Z")

</div>

Hi, How can we use the negation operator in DPL? For instance, in the example below, the DataKey is always a string of 24 digits. It is essentially a timestamp followed by an identifier. I need to check log records when…

---

## [Replace number with generic string](https://community.dynatrace.com/t/replace-number-with-generic-string/40020)

<div class="topic-metadata">

**Author:** [@educampver](https://community.dynatrace.com/u/educampver)\
**Replies:** 1\
**Last updated:** [June 1, 2023, 10:54am UTC](https://community.dynatrace.com/t/replace-number-with-generic-string/40020 "2023-06-01T10:54:46Z")

</div>

Hi, How can I replace a numeric (or other pattern) string with a generic one? For example, my DQL query returns: /v1/shipments/customer-picked-up /v1/shipments/containers/100000011782/hold-locations /v1/shipments/20230…

---

## [How to access fields with special characters](https://community.dynatrace.com/t/how-to-access-fields-with-special-characters/40006)

<div class="topic-metadata">

**Author:** [@sinisa\_zubic](https://community.dynatrace.com/u/sinisa_zubic)\
**Replies:** 1\
**Last updated:** [June 1, 2023, 7:51am UTC](https://community.dynatrace.com/t/how-to-access-fields-with-special-characters/40006 "2023-06-01T07:51:20Z")

</div>

Hi Team,how to specify a field with “-” in the name, e.g. security-problem.id?Best,Sini

---

## [Show mount points instead of entity names](https://community.dynatrace.com/t/show-mount-points-instead-of-entity-names/40001)

<div class="topic-metadata">

**Author:** [@sinisa\_zubic](https://community.dynatrace.com/u/sinisa_zubic)\
**Replies:** 1\
**Last updated:** [June 1, 2023, 6:50am UTC](https://community.dynatrace.com/t/show-mount-points-instead-of-entity-names/40001 "2023-06-01T06:50:17Z")

</div>

Hi team!!Is there any way to show the names of the mount points instead of entity names in a dql query like this? timeseries from:now()-2h, to:now(),avg(dt.host.disk.used),by:{host.name,dt.entity.disk},interval:1m | fil…

---

## [Parse JSON array](https://community.dynatrace.com/t/parse-json-array/40003)

<div class="topic-metadata">

**Author:** [@stefan\_eggersto](https://community.dynatrace.com/u/stefan_eggersto)\
**Replies:** 1\
**Last updated:** [June 1, 2023, 6:42am UTC](https://community.dynatrace.com/t/parse-json-array/40003 "2023-06-01T06:42:39Z")

</div>

Hi all, is it possible in DQL to parse a JSON string that contains an array on the top level? I can parse a top-level JSON object like data record(value = "{\\"hello\\" : \\"world\\"}") | parse value, "JSON:json" But I…

---

## [Display data in calendar weeks](https://community.dynatrace.com/t/display-data-in-calendar-weeks/40000)

<div class="topic-metadata">

**Author:** [@stefan\_eggersto](https://community.dynatrace.com/u/stefan_eggersto)\
**Replies:** 1\
**Last updated:** [June 1, 2023, 6:33am UTC](https://community.dynatrace.com/t/display-data-in-calendar-weeks/40000 "2023-06-01T06:33:50Z")

</div>

How can I aggregate my data into calendar weeks? This is a simplified version of my query: fetch events | summarize count(), by:{bin(timestamp, 7d)} This chart shows the beginning of the weeks in the legend, but I’d li…

---

## [Single avg value instead full timeseries](https://community.dynatrace.com/t/single-avg-value-instead-full-timeseries/40007)

<div class="topic-metadata">

**Author:** [@stefan\_eggersto](https://community.dynatrace.com/u/stefan_eggersto)\
**Replies:** 1\
**Last updated:** [June 1, 2023, 6:27am UTC](https://community.dynatrace.com/t/single-avg-value-instead-full-timeseries/40007 "2023-06-01T06:27:59Z")

</div>

I’d like to display one single value (the average of all the value of the chart) instead of a timeseries.When I choose “Single Value” display, it seems to display the values of ALL hosts, instead of one average:

---

## [Timeseries with entity name](https://community.dynatrace.com/t/timeseries-with-entity-name/39997)

<div class="topic-metadata">

**Author:** [@stefan\_eggersto](https://community.dynatrace.com/u/stefan_eggersto)\
**Replies:** 1\
**Last updated:** [June 1, 2023, 6:19am UTC](https://community.dynatrace.com/t/timeseries-with-entity-name/39997 "2023-06-01T06:19:40Z")

</div>

When I run the DQL timeseries cpu=avg(dt.host.cpu.usage), by:dt.entity.host, I only get the ID for each series. When I run the equivalent metric selector builtin:host.cpu.usage:splitBy("dt.entity.host") in the Data Explo…

---

## [Fetch constant value/record](https://community.dynatrace.com/t/fetch-constant-value-record/39999)

<div class="topic-metadata">

**Author:** [@sinisa\_zubic](https://community.dynatrace.com/u/sinisa_zubic)\
**Replies:** 1\
**Last updated:** [June 1, 2023, 6:15am UTC](https://community.dynatrace.com/t/fetch-constant-value-record/39999 "2023-06-01T06:15:35Z")

</div>

hello,Is there any way in DQL to return a constant value? In SQL it would be something like select 'hello world' from dual Best, Sini

---

## [Last value from timeseries](https://community.dynatrace.com/t/last-value-from-timeseries/39998)

<div class="topic-metadata">

**Author:** [@sinisa\_zubic](https://community.dynatrace.com/u/sinisa_zubic)\
**Replies:** 1\
**Last updated:** [June 1, 2023, 6:12am UTC](https://community.dynatrace.com/t/last-value-from-timeseries/39998 "2023-06-01T06:12:40Z")

</div>

Hi, When using the timeseries command with the goal of displaying a single value (on the single value visualization), what is the best/preferred DQL syntax? Best, Sini

---

## [Keep fields with a prefix](https://community.dynatrace.com/t/keep-fields-with-a-prefix/39995)

<div class="topic-metadata">

**Author:** [@stefan\_eggersto](https://community.dynatrace.com/u/stefan_eggersto)\
**Replies:** 1\
**Last updated:** [May 31, 2023, 2:29pm UTC](https://community.dynatrace.com/t/keep-fields-with-a-prefix/39995 "2023-05-31T14:29:41Z")

</div>

Is there a possibility to keep fields that start with a specific string?E.g. in my case I want to keep all fields that start with behavioral. and remove the remaining fields?

---

## [Order of columns](https://community.dynatrace.com/t/order-of-columns/39994)

<div class="topic-metadata">

**Author:** [@stefan\_eggersto](https://community.dynatrace.com/u/stefan_eggersto)\
**Replies:** 1\
**Last updated:** [May 31, 2023, 2:07pm UTC](https://community.dynatrace.com/t/order-of-columns/39994 "2023-05-31T14:07:31Z")

</div>

Can we set the order of columns?I want following order in the table: timestamp log.source then the column order can be random

---

## [how to find max of a series of reccords](https://community.dynatrace.com/t/how-to-find-max-of-a-series-of-reccords/39703)

<div class="topic-metadata">

**Author:** [@Stephen1\_Lee](https://community.dynatrace.com/u/Stephen1_Lee)\
**Replies:** 1\
**Last updated:** [May 12, 2023, 5:00am UTC](https://community.dynatrace.com/t/how-to-find-max-of-a-series-of-reccords/39703 "2023-05-12T05:00:53Z")

</div>

I can use arrayMax to return a series of records each of which is the max of an array. But now I want the max of all these records. max(arrayMax()) and arrayMax(arrayMax()) give an error. Here is the final part of th…

---

## [Filter Data by Tags in Dynatrace Query Language (DQL)](https://community.dynatrace.com/t/filter-data-by-tags-in-dynatrace-query-language-dql/39705)

<div class="topic-metadata">

**Author:** [@Stephen1\_Lee](https://community.dynatrace.com/u/Stephen1_Lee)\
**Replies:** 1\
**Last updated:** [May 11, 2023, 8:35pm UTC](https://community.dynatrace.com/t/filter-data-by-tags-in-dynatrace-query-language-dql/39705 "2023-05-11T20:35:50Z")

</div>

Summary: This thread explains how to filter data using tags in DQL queries. It includes syntax examples and practical tips for refining dashboards and reports in Dynatrace. How to filter by tags in DQL? This gives many…

---

## [Grail query container data by namespace](https://community.dynatrace.com/t/grail-query-container-data-by-namespace/39639)

<div class="topic-metadata">

**Author:** [@Stephen1\_Lee](https://community.dynatrace.com/u/Stephen1_Lee)\
**Replies:** 4\
**Last updated:** [May 10, 2023, 7:38am UTC](https://community.dynatrace.com/t/grail-query-container-data-by-namespace/39639 "2023-05-10T07:38:38Z")

</div>

Hi, Can we retrieve the container data by container name and namespace? timeseries memory=avg(dt.containers.memory.usage\_percent), by:{dt.entity.container\_group} | filter contains(dt.entity.container\_group,“CONTAINER\_…

---

## [Grail DQL concept question](https://community.dynatrace.com/t/grail-dql-concept-question/38597)

<div class="topic-metadata">

**Author:** [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Replies:** 2\
**Last updated:** [March 2, 2023, 10:57am UTC](https://community.dynatrace.com/t/grail-dql-concept-question/38597 "2023-03-02T10:57:07Z")

</div>

Hello, Will or can a fetch ever be used for two different types? e.g. Fetch logs and metrics ….. Or is this functionality only available by other means? Can anyone elaborate on this? KR Henk

[Previous page](https://community.dynatrace.com/c/platform/dql/83.md?page=26)
