1$Query = new Query;
2$Query->select(['um.id as USERid', 'um.first_name', 'um.last_name','um.email','COUNT(g.id) as guestCount'])
3->from('user_master um')
4->join('LEFT JOIN', 'guest g', 'g.user_id = um.id')
5->limit(20)
6->offset(12)
7->groupBy('um.id')
8->orderBy(['um.id' => SORT_DESC]);