SELECT Date, SUM(CASE Confirm WHEN 1 THEN 1 ELSE 0 END) Confirmed,
SUM(CASE Confirm WHEN 0 THEN 1 ELSE 0 END) Pending,
FROM Table
GROUP BY Date
SELECT Date, SUM(CASE Confirm WHEN 1 THEN 1 ELSE 0 END) Confirmed,
SUM(CASE Confirm WHEN 0 THEN 1 ELSE 0 END) Pending,
FROM Table
GROUP BY Date