Postgresql Select Count Distinct Multiple Columns In Cas