Sorting Leaders By Name

Sort Community Leaders in Community by Alphabetical Order
Below 3 lines are added
$order = 'name';
$sort = 'ASC';
$query->orderBy($order, $sort);