Example: 
SELECT 
  
/* event identifier */ 
e.nId,  
  
/* time, when the event occurred */ 
e.tmRiseTime,  
  
/* internal name of the event type */ 
e.strEventType,  
  
/* displayed name of the event */ 
e.wstrEventTypeDisplayName,  
  
/* displayed description of the event */ 
e.wstrDescription,  
  
/* name of the group, where the device is located */ 
e.wstrGroupName,  
  
/* displayed name of the device, on which the event occurred */ 
h.wstrDisplayName,  
CAST(((h.nIp / 16777216) & 255) AS varchar(4)) + '.' + 
CAST(((h.nIp / 65536) & 255) AS varchar(4)) + '.' + 
CAST(((h.nIp / 256) & 255) AS varchar(4)) + '.' + 
  
/* IP-address of the device, on which the event occurred */ 
CAST(((h.nIp) & 255) AS varchar(4)) as strIp  
FROM v_akpub_ev_event e 
INNER JOIN v_akpub_host h ON h.nId=e.nHostId 
WHERE e.tmRiseTime>=DATEADD(Day, -7, GETUTCDATE()) 
ORDER BY e.tmRiseTime DESC 
 |