It's UWAweek 47

help1402

This forum is provided to promote discussion amongst students enrolled in CITS1402 Relational Database Management Systems.

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.

How do I ask a good question?
Displaying selected article
Showing 1 of 684 articles.
Currently 117 other people reading this forum.


 UWA week 35 (2nd semester, week 6) ↓
SVG not supported

Login to reply

👍?
helpful
3:26pm Wed 28th Aug, Adam W.

Hi, This has also been updated, there is an issue with the way the conditions in the having are evaluated. HAVING count(cust_id) > 2 AND city OR phone IS NOT NULL should be HAVING COUNT(cust_id) > 2 AND (city IS NOT NULL OR phone IS NOT NULL) You need to have the criteria attached to both of the boolean checks (for city and for phone). It could be that sqlite lets you do this, by evaluating the 'city' as true automatically, then it would be 'TRUE OR phone IS NOT NULL' which would automatically mean its always going to be TRUE. Thanks, Adam. ANONYMOUS wrote:
> Hi, > > >From the lectures, > > "Column names in HAVING clause must also appear in the GROUP BY list or be contained > within an aggregate function." > > The solution uses > > HAVING count(cust_id) > 2 and city OR phone IS NOT NULL > > However, column city, phone are not in the GROUP BY list. > > Could someone please explain why? > > Thanks.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy