Re: How to count unique values in a column? >> select count (distinct session_id) from event_test;
>>
>> and got:
>>
>> You have an error in your SQL syntax; check the manual that corresponds
>> to your MySQL server version for the right syntax to use near 'distinct
>> session_id) from event_test at line 1.
>>
>> The table and the column name is correct. What am I doing wrong?
>
> When it says 'near', it nearly always means 'immediately to the left
> of'!
>
> Try removing the space between count and (
>
Thanks. I'm a complete dope. |