Yii数据库子查询嵌入select中,而不是where条件语句中
$subQuery = (new Query())->select('COUNT(*)')->from('user');
// SELECT `id`, (SELECT COUNT(*) FROM `user`) AS `count` FROM `post`
$query = (new Query())->select(['id', 'count' => $subQuery])->from('post');
不太懂'count' => $subQuery
插入的意思。