Dylan Jack
Dylan Jack

Reputation: 69

Why am I getting enter parameter value in my sql code

SELECT Forename, test1, test2, test3, test4,  ((test1+test2+test3+test4)/4) AS aMark
FROM Question1
GROUP BY Forename, test1, test2, test3, test4
ORDER BY aMark ASC;

I am trying to calculate the average of 4 test marks, but when I execute my code it comes up with a message saying to enter parameter value for 'aMark', would anyone be able to explain why and how I would fix this?

Upvotes: 1

Views: 52

Answers (1)

Harun24hr
Harun24hr

Reputation: 36840

You can also use below query

SELECT Question1.*, ((test1+test2+test3+test4)/4) AS aMark
  FROM Question1
ORDER BY ((test1+test2+test3+test4)/4) ASC;

enter image description here

Upvotes: 1

Related Questions