This is much more complex than the one in Yii 1.1. Is there anything new here? I noticed the query brings back several columns that are not used at all.