Professional Documents
Culture Documents
S14 Single Row Subqueries
S14 Single Row Subqueries
1. Return first name, last name, and salary for employees who earn the lowest salary.
2. Return customer id, customer name, and available credit (credit limit – balance) for
customers where their available credit is greater than the average available credit for all
customers. Sort available credit descending. Return first six rows only.
3. Return customer name, order id, and the number of days to ship the orders. Only return
orders that took longer than the average number of days to ship all orders. Sort by the
number of days to ship descending.
4. Return employee information shown for employees that have a monthly salary > the
average monthly salary for department code MA. Sort monthly salary descending. Return
the first eight rows only.
6. Which employees have the same department code as the Video Games department? Use
"Video Games" in the subquery. Sort by last name.
EMPLOYEE_NAME
Trish Albert
Steve Carr
Janis Hill
Jake Lee
7. Return employee name, job code, and job title for employees that have the same job code
as an employe id entered as a Bind variable. Sort by last name.