# Identify Assets that are only in a Discovery Site

**URL:** <https://discuss.rapid7.com/t/identify-assets-that-are-only-in-a-discovery-site/17089>\
**Category:** Query Builder\
**Tags:** InsightVM, queries\
**Created:** [November 11, 2022, 5:11pm UTC](https://discuss.rapid7.com/t/identify-assets-that-are-only-in-a-discovery-site/17089 "2022-11-11T17:11:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandon\_mcclure](https://discuss.rapid7.com/user_avatar/discuss.rapid7.com/brandon_mcclure/32/182_2.png) [@brandon\_mcclure](https://discuss.rapid7.com/u/brandon_mcclure)\
**Post date:** [November 11, 2022, 5:11pm UTC](https://discuss.rapid7.com/t/identify-assets-that-are-only-in-a-discovery-site/17089/1 "2022-11-11T17:11:59Z")

</div>

I’m trying to Identify Assets that are only in a Discovery Site and not Global or a Vulnerability Site.  
I started with asset.sites NOT IN for my query, but the returned data is not including the rest of the Asset information needed to figure out why they are missed. I would like to see all the standard Asset data and an array of Sites that an Asset is in. I pulled an Asset’s information from the API, but there wasn’t a member for Sites listed, even under Links where I thought there would be.  
Any suggestions here?

---

<div class="post-metadata">

**Author:** ![john\_hartman](https://discuss.rapid7.com/user_avatar/discuss.rapid7.com/john_hartman/32/1255_2.png) [@john\_hartman](https://discuss.rapid7.com/u/john_hartman)\
**Post date:** [November 14, 2022, 1:54pm UTC](https://discuss.rapid7.com/t/identify-assets-that-are-only-in-a-discovery-site/17089/2 "2022-11-14T13:54:52Z")

</div>

I just ran a simple test query in my own environment and I got all blank values for the sites column. I’m looking into it to see why that might be because while I don’t know if the value should be an integer or an array I know it should be something other than blank.

Also though, for trying to find membership to only one site the query is kinda backwards. You would need to go into expert mode and do NOT (assets.sites IN Global, SiteA, SiteB) etc

---

<div class="post-metadata">

**Author:** ![brandon\_mcclure](https://discuss.rapid7.com/user_avatar/discuss.rapid7.com/brandon_mcclure/32/182_2.png) [@brandon\_mcclure](https://discuss.rapid7.com/u/brandon_mcclure)\
**Post date:** [November 15, 2022, 2:52pm UTC](https://discuss.rapid7.com/t/identify-assets-that-are-only-in-a-discovery-site/17089/3 "2022-11-15T14:52:16Z")

</div>

I would expect to see an array, Global should just indicate that length(assets.sites) \> 1

---

<div class="post-metadata">

**Author:** ![corey\_tadlock](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/c/53a042/32.png) [@corey\_tadlock](https://discuss.rapid7.com/u/corey_tadlock)\
**Post date:** [April 27, 2023, 9:27pm UTC](https://discuss.rapid7.com/t/identify-assets-that-are-only-in-a-discovery-site/17089/4 "2023-04-27T21:27:50Z")

</div>

Table/field may be different in console vs data warehouse, but you can use “last assessed for vulnerabilities” and return assets where the value is null.

select  
da.host\_name  
from dim\_asset da  
where da.last\_assessed\_for\_vulnerabilities is null
