# How to get the details of host name, hostgroup details from particular MZ  using DQL

**URL:** <https://community.dynatrace.com/t/how-to-get-the-details-of-host-name-hostgroup-details-from-particular-mz-using-dql/49249>\
**Category:** DQL\
**Tags:** dql, dynatrace-managed, notebooks\
**Created:** [December 9, 2024, 4:38am UTC](https://community.dynatrace.com/t/how-to-get-the-details-of-host-name-hostgroup-details-from-particular-mz-using-dql/49249 "2024-12-09T04:38:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sisapy09](https://avatars.discourse-cdn.com/v4/letter/s/e0b2c6/32.png) [@Sisapy09](https://community.dynatrace.com/u/Sisapy09)\
**Post date:** [December 9, 2024, 4:38am UTC](https://community.dynatrace.com/t/how-to-get-the-details-of-host-name-hostgroup-details-from-particular-mz-using-dql/49249/1 "2024-12-09T04:38:00Z")

</div>

I tried below query but not working. can someone help me with query.

fetch dt.entity.host

| managementzones == “Cloud : AWS”

|flieds hosts, hostgroup

it&nbsp; is giving blank result

---

<div class="post-metadata">

**Author:** ![Fin\_Ubels](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/fin_ubels/32/18008_2.png) [@Fin\_Ubels](https://community.dynatrace.com/u/Fin_Ubels)\
**Post date:** [December 9, 2024, 5:08am UTC](https://community.dynatrace.com/t/how-to-get-the-details-of-host-name-hostgroup-details-from-particular-mz-using-dql/49249/2 "2024-12-09T05:08:29Z")

</div>

Hey&nbsp;[@Sisapy09](https://community.dynatrace.com/user/83727)

In the above query you are missing the filter command. By simply typing “managementzones == cloud:aws” Dynatrace doesn’t know to use this as a filter. You would have something like the below. Also something else to note, the fields you specified are incorrect too. When using the fields command there should be a suggestion list which is useful for determining the fields available.

 ![Fin_Ubels_0-1733720647288.png](https://global.discourse-cdn.com/dynatrace/original/2X/b/ba936bbadb02f69732df0adc0d40195fff2f7783.png)

In the future there is also [this documentation](https://docs.dynatrace.com/docs/discover-dynatrace/references/dynatrace-query-language/commands#filtering-commands) which details all of the commands available and provides examples of how to use them. Hope this helps!
