PHP
1
Вклад в тег
$query = (new \yii\db\Query())->
select(["to_char(cd.date, 'YYYY-MM-dd HH24:MI') as day",
"c.host_id", "cd.customer_id"])
->from('customer_download cd')
->leftJoin('customer c', '"c"."id" = "cd"."customer_id"')