Правилният начин да го направите:
SELECT
user,
IF(SUM(group = 'A'), TRUE, FALSE) AS IN_A,
IF(SUM(group = 'B'), TRUE, FALSE) AS IN_B,
IF(SUM(group = 'C'), TRUE, FALSE) AS IN_C
FROM users
GROUP BY user
Правилният начин да го направите:
SELECT
user,
IF(SUM(group = 'A'), TRUE, FALSE) AS IN_A,
IF(SUM(group = 'B'), TRUE, FALSE) AS IN_B,
IF(SUM(group = 'C'), TRUE, FALSE) AS IN_C
FROM users
GROUP BY user