When trying to count distinct values I have an error:
Every derived table must have its own alias
my query :
select count(*) as user from (select distinct user_type from userValidation);
When trying to count distinct values I have an error:
Every derived table must have its own alias
my query :
select count(*) as user from (select distinct user_type from userValidation);
You should add an alias for the subquery:
select count(*) as user from (select distinct user_type from userValidation) t
but you can get the same results without the subquery:
select count(distinct user_type) as user from userValidation