Im trying to have a Total row at the end of query result im using MS-SQL 2012, need some help heres my query
SELECT
PropertyValue As Answer,Count(*) As rCount
FROM
QuestionerDetail AS Temp
where
QuestionId = 42 and FormId = 1
GROUP BY PropertyValue
Union All
SELECT 'Total',sum(rCount)
FROM
temp
Im doing something really wrong here.
The Result should be like
Answer rCount
-------------
One 10
Two 25
Total 35
Thanks.