I have a lot of queries with a bit different from each other for example the first query is same to second query except I add a single line of where statement to it.
Code:
if($ut=='Admin'){ // if the user is Admin the query should not have a filter
        	$queryCustomer = Yii::app()->db->createCommand()
				->select('cust.mobile_number as customer,sum(trans.price) as sales,trans.datetime')
		 		->from('customers cust')
...