SELECT * FROM events WHERE devicetype=12 AND (LOWER("Parent Process Path") LIKE '%\sqlservr.exe' AND ((LOWER("Process Path") LIKE '%\bash.exe' OR LOWER("Process Path") LIKE '%\bitsadmin.exe' OR LOWER("Process Path") LIKE '%\cmd.exe' OR LOWER("Process Path") LIKE '%\netstat.exe' OR LOWER("Process Path") LIKE '%\nltest.exe' OR LOWER("Process Path") LIKE '%\ping.exe' OR LOWER("Process Path") LIKE '%\powershell.exe' OR LOWER("Process Path") LIKE '%\pwsh.exe' OR LOWER("Process Path") LIKE '%\regsvr32.exe' OR LOWER("Process Path") LIKE '%\rundll32.exe' OR LOWER("Process Path") LIKE '%\sh.exe' OR LOWER("Process Path") LIKE '%\systeminfo.exe' OR LOWER("Process Path") LIKE '%\tasklist.exe' OR LOWER("Process Path") LIKE '%\wsl.exe') OR (LOWER("Process Name") LIKE '%\bash.exe' OR LOWER("Process Name") LIKE '%\bitsadmin.exe' OR LOWER("Process Name") LIKE '%\cmd.exe' OR LOWER("Process Name") LIKE '%\netstat.exe' OR LOWER("Process Name") LIKE '%\nltest.exe' OR LOWER("Process Name") LIKE '%\ping.exe' OR LOWER("Process Name") LIKE '%\powershell.exe' OR LOWER("Process Name") LIKE '%\pwsh.exe' OR LOWER("Process Name") LIKE '%\regsvr32.exe' OR LOWER("Process Name") LIKE '%\rundll32.exe' OR LOWER("Process Name") LIKE '%\sh.exe' OR LOWER("Process Name") LIKE '%\systeminfo.exe' OR LOWER("Process Name") LIKE '%\tasklist.exe' OR LOWER("Process Name") LIKE '%\wsl.exe'))) AND (NOT((LOWER("Parent Process Path") LIKE 'c:\program files\microsoft sql server\%' AND LOWER("Parent Process Path") LIKE '%datev_dbengine\mssql\binn\sqlservr.exe' AND ("Process Path"='C:\Windows\System32\cmd.exe' OR "Process Name"='C:\Windows\System32\cmd.exe') AND LOWER(Command) LIKE '"c:\windows\system32\cmd.exe" %')))