我正在尝试合并以下查询的计数:
SELECT recipient AS otheruser, COUNT(*)
FROM privatemessages
WHERE sender = '$userid'
GROUP BY recipient
SELECT sender AS otheruser, COUNT(*)
FROM privatemessages
WHERE recipient = '$userid'
GROUP BY sender
如果无论如何要结合这两个查询,并将每个“其他用户”的计数(*)加在一起