Link to home
Start Free TrialLog in
Avatar of checkmofoshoduno
checkmofoshoduno

asked on

How can i fix this query?


I need to know why the following command would create an error, and what could be changed to fix the error:

SELECT S_NUM, SUM(S_PHQ)
FROM      ORDER;
SOLUTION
Avatar of Cluskitt
Cluskitt
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of checkmofoshoduno
checkmofoshoduno

ASKER

Whats wrong with the first query?
Got it, thankk you
You can't have aggregation function with a simple field in a select statement without "group by". This is a rule.