I want to implement following SQL queries in Yii 2 but with no success.
This should give total number of unique company names:
SELECT count(DISTINCT(company_name)) FROM clients
And this should display company_name
with client code
and id(PK)
:
SELECT (DISTINCT(company_name,client_code)) FROM clients
How to achieve this?