I have the following query:
SELECT
a.source,
TotalCount,
ActiveCount
FROM
(
SELECT COUNT(*) AS TotalCount, a.source
FROM internship a
GROUP BY a.source
) AS A
join
(
SELECT COUNT(*) AS ActiveCount, b.source
FROM internship b
WHERE b.int_lastdate > CURDATE() AND b.status LIKE 'Published'
GROUP BY b.source
) AS B
ON A.source = B.source
The above query gives me a result like this:
I want to add another column here that will be "ExpiredCount = TotalCount - ActiveCount"
How can I acheive that?
