In yii2 how to select unique values from a database?
Necessary to choose values for 2 fields (E.g. code and name), the lines where the field "code" is repeated, though the "name" field is different, to get should not.
The result roughly should be:
[code => 1, name => a]
[code => 2, name => a]
[code => 3, name => b],