Please consider offering answers and suggestions to help other students!
And if you fix a problem by following a suggestion here,
it would be great if other interested students could see a short
"Great, fixed it!" followup message.
Hi, I just wanted to know when we will get the marks for the first part of take home test (MCQs?).
Asking because we can get marks instantly for SQL part, not it is not the case for MCQ part, I wonder why.
In that case, shouldn't the GROUP BY clause also have phone and city in it? In one of the slides I saw that if attributes are not in an aggregate function in the HAVING clause, they must be mentioned in the GROUP BY clause.
I was thinking it would be
SELECT creditcode, count(cust id) AS 'Number of Publishers'
FROM publishers
WHERE city IS NOT NULL OR phone IS NOT NULL
GROUP BY creditcode
HAVING COUNT(cust id) 2
ORDER BY creditcode;
Am I wrong?
Hello,
While I was preparing for the mid-term exam, in one of the slides I found the statement
If SELECT list includes an aggregate function and there is no GROUP BY clause, SELECT list cannot reference a column out with an aggregate function. For e...