Hello, I have this Query, which filters badges without events for X days.
I need to add to this report the name and ID of the person assigned to the badges.
Do you know how I could do that?
Query
select b.card_num from vx_badge b left join vx_cred c on b.unid = c.unid where b.unid NOT IN (select cred from vx_evt where evt_type_id in ('EVENT') and logcode_id in ('GW.EV_DOOR_GRANT_ACCESS', 'GW.EV_DOOR_DENY_ACCESS_NO_ACC') and cred IS NOT NULL and evt_time >= DATE_SUB(NOW(), INTERVAL 30 DAY)) and c.validity_type='VX.ACTIVE' order by card_num;
regards