---
updatedAt: 2025-08-14T18:22:44.000Z
agentTools:
  siteIndex: https://developer.n-able.com/llms.txt
  projectIndex: https://developer.n-able.com/n-central/llms.txt
---

# Do all of [a customer name's] devices appear to have virus protection installed - Direct Data Access DDA

```curl SQL
select count(distinct assets.device_dk) = 0 FROM SHARED_ANALYTICS_DATA.SHARED_DATA.FACT_ANTIVIRUS_STATUS_LATEST av right join SHARED_ANALYTICS_DATA.SHARED_DATA.FACT_ASSET_COUNT_DAY assets on assets.DEVICE_DK = av.device_dk
LEFT JOIN SHARED_ANALYTICS_DATA.SHARED_DATA.DIM_CUSTOMER_LATEST as customer ON assets.CUSTOMER_DK = customer.CUSTOMER_DK
where (av.ANTIVIRUS_PRODUCT_DK IS NULL OR av.ANTIVIRUS_PRODUCT_DK = 0) and NAME ilike '%green%groc%' and  num_device = 1 and assets.snapshot_date = ( select max(snapshot_date) from SHARED_ANALYTICS_DATA.SHARED_DATA.FACT_ASSET_COUNT_DAY ) group by name
```

```json Response Example
{"success":true}
```

# Replace %green%groc% with a customer name



In this example, we are using a fictional customer named Green Grocer

# Note on query structure



Intentionally relying on two fact tables in this query. A device will on be present in FACT_ANTIVIRUS_STATUS_LATEST if the device is/was known to have av installed so to get the list of devices without av installed that table must be joined to the FACT_ASSET_DAY_COUNT table