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.