how to convert mysql subquery to yii CDbCriteria table list: 1) user_group 2) user_group_data 3) user_group_data_revision. select * from ( select ugd.group_id as group_id, ug.user_id as user_id, ugd.id as group_data_id, ugd.group_name as group_name, ugd.group_description as group_description, ugd.email as group_admin_email, ugd.image as group_image, ugd.group_type as group_type, ugd.request. The WITH clause, or subquery factoring clause, is part of the SQL-99 standard and was added into the Oracle SQL syntax in Oracle 9.2. The WITH clause may be processed as an inline view or resolved as a temporary table. The advantage of the latter is that repeated references to the subquery may be more efficient as the data is easily retrieved from the temporary table, rather than being.