WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '// NEW
COUNT(DISTINCT ip) as unique_ips
FROM `wps...' at line 6]
SELECT
COUNT(*) as total_requests,
SUM(CASE WHEN score >= 8 THEN 1 ELSE 0 END) as high_score,
SUM(CASE WHEN action = 'blocked' THEN 1 ELSE 0 END) as blocked,
SUM(CASE WHEN action = 'challenged' THEN 1 ELSE 0 END) as challenged,
SUM(CASE WHEN action = 'recaptcha_failed' THEN 1 ELSE 0 END) as recaptcha_failed, // NEW
COUNT(DISTINCT ip) as unique_ips
FROM `wpsk_safebot_logs`
WHERE created_at > DATE_SUB(NOW(), INTERVAL 5 MINUTE)