I have a SELECT statement similar to the one below which returns several counts in one query.
SELECT invalidCount = (SELECT COUNT(*) FROM <...a...> WHERE <...b...>),
unknownCount = (SELECT COUNT(*) FROM <...c...> WHERE <...d...>),
totalCount = (SELECT COUNT(*) FROM <...e...> WHERE <...f...>)
This works fine but I wanted to add two percentage columns to the SELECT:
invalidCount * 100 / totalCount AS PercentageInvalid,
unknownCount * 100 / totalCount AS UnknownPercentage
How do I modify my SELECT statement to handle this?