$_query = DB::table(‘a as o’)
->leftJoin(DB::raw("( select source_id,count( user_id ) AS click,
count( DISTINCT user_uid ) AS only_click from `aa`
where `click_dt` >= '$start_date'
AND `click_dt` <= '$end_date'
GROUP BY source_id ) as cli"),'cli.source_id','=','o.itemId')
->where('o.Time','>=',$start_date.' 00:00:00')
->where('o.Time','<=',$end_date.' 23:59:59')
->where('o.status','!=',13);