select t1.AdId, t1.City from butuzLOCAL.product as t1 join statistic.user_2 as t2 on t1.AdId = t2.AdId
where t2.date = '2019-11-12'
$query = "SELECT
t1.AdId,
t1.City
FROM butuzLOCAL.product AS t1
JOIN statistic.user_2 AS t2 ON t1.AdId = t2.AdId
WHERE t2.date = :dttm";
$results = Yii::$app->db
->createCommand($query)
->bindValues([
'dttm'=>'2019-11-12'
])
->queryAll();