PHP-Code:
SELECT users.user_id,
name,
status.description,
COUNT(status.status_id) AS allcalls,
COUNT(DISTINCT status.contact_id) AS singlecalls,
COUNT(status.description) AS done
FROM users, status
WHERE user_type = 'agent'
AND users.user_id = status.user_id
GROUP BY users.user_id ;
Also wie zum Beispiel COUNT(status.description='done') AS done .
Das funktioniert aber so nicht.
Die ersten beiden COUNT´s funtionieren
Kommentar