In the query above, first we combine id and name of both employees and customers into one result set using the UNION operator. Then we sort the result set by using the ORDER BY clause. Notice that we put the SELECT statements inside the parentheses and place the ORDER BY clause as the last statement.