**Steps to replicate the issue** (include links if applicable):
* Run experimental tests, which include the PHPUnit tests run using a postgres DB
**What happens?**:
The postgres tests fail. Some of these failures from TemporaryAccountHandler::getData. Example:
```
1) MediaWiki\CheckUser\Tests\Integration\Api\Rest\Handler\TemporaryAccountHandlerTest::testExecute
13:25:57 Wikimedia\Rdbms\DBQueryError: Error 42P10: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list
13:25:57 LINE 1: ...t_cu_changes" WHERE cuc_actor = 1234 ORDER BY cuc_actor ...
13:25:57 ^
13:25:57
13:25:57 Function: MediaWiki\CheckUser\Api\Rest\Handler\TemporaryAccountHandler::getData
13:25:57 Query: SELECT DISTINCT cuc_ip AS "value" FROM "unittest_cu_changes" WHERE cuc_actor = 1234 ORDER BY cuc_actor DESC,cuc_ip DESC,cuc_timestamp DESC LIMIT 5000
```
**What should have happened?**
The tests should not have failed in this way.
**Other information**
The tests failing indicate that the query being run will not work on a postgres DB. I have not been able to test it myself on a postgres DB.
This might have to be something that is addressed in the SelectQueryBuilder that constructs the query, but in any case this should be fixed.