sql - Condition as a column named using AS "name" in mysql -
i trying count line has columns been repeated (their value) more x times in mysql, every time try execute query error :
select distinct idlogin, count(idlogin ) "cou" `products` t group idlogin having t.cou > 2
why error happening
use one
select distinct idlogin, count(idlogin ) cou `products` group idlogin having cou > 2
Comments
Post a Comment