Postgresql Select Count Distinct Mysql Command