Calculating Asset Quantities from SQL Query
- sql
- Custom
- Asset
- Custom SQL Quantity
- calculated quantity
- quantity
- count

Example below
select count(did) as [Quantity]
from device
left join xtype on ttypenum = dtype
where dsite in (select ssitenum from site where sarea= (select ihaarea from invoiceheader where ihid=$INVOICEID))
and (tdesc like '%Workstation%' OR tdesc like '%IPSec Tunnel%') and tdesc NOT like '%Switch%'
from device
left join xtype on ttypenum = dtype
where dsite in (select ssitenum from site where sarea= (select ihaarea from invoiceheader where ihid=$INVOICEID))
and (tdesc like '%Workstation%' OR tdesc like '%IPSec Tunnel%') and tdesc NOT like '%Switch%'