I have the following query :
select a.username, count(a.problemID) as NumberOfSubmission, Q_Score = sum( case when a.accepted = 0 then -2 when count(a.accepted) > 1 then -1 else 20 end) from tblSubmission a
I am getting the following error :
"Cannot perform an aggregate function on an expression containing an aggregate or a subquery."
Can anyone tell me how can I use the count aggregation function or something similar to count here?
Thank You