I'm tried to execute the below query in MSSQL 2008 R2,but its throwing error. THE QUERY IS:
SELECT (n_artifactType+(' '+ n_actionPerformed)) AS actionperformed,
COUNT(n_actionPerformed) total FROM notifications WHERE n_project='JupiterQA'
GROUP BY actionperformed order by n_actionPerformed;
ERROR IS:
Msg 207, Level 16, State 1, Line 1
Invalid column name 'actionperformed'.
Using 'actionperformed' as alias name even though its throwing error. How can I execute above query without error.