Document
Document
5000 to 10000. Display the output in a single column with the format 100 : King Label the column as
Employee
Select one:
a.
b.
SELECT CONCAT(CONCAT(employee_id, ‘:’), last_name) AS Employee FROM employees WHERE salary >=
5000 AND salary <= 10000
c.
d.
SELECT CONCAT(employee_id, ‘:’, last_name) AS Employee, salary FROM employees WHERE salary
BETWEEN 5000 TO 10000
Display part number description and warehouse number whose part number starts with letter K.
Select one:
a.
SELECT partnum, description, warehouse FROM parts WHERE partnum LIKE ‘K%’;
b.
c.
SELECT partnumber, description, warehouse FROM parts WHERE partnum = LIKE ‘K%’;
d.
SELECT partnum, description, warehouse FROM parts WHERE partnum = LIKE ‘K%’;
e.
SELECT partnum, description, warehouse FROM parts WHERE partnum LIKE ‘*K*’;
f.
g.
SELECT partnumber, description, warehouse FROM parts WHERE partnum LIKE ‘K*’;
Display the first 5 letter in the surname of all the employees whose firstname starts with letter ‘D’
Select one:
a.
b.
c.
d.
Display all the employee’s id and salary whose annual salary is from 100,000 to 200,000. Arrange the
output by salary in descending order.
Select one:
a.
SELECT employee_id, salary FROM employees WHERE salary *12 >= 100000 AND salary *12 <= 200000
ORDER BY salary desc
b.
SELECT employee_id, salary, salary *12 FROM employees WHERE 12* salary = 100000 AND 12 *salary =
200000 ORDER BY salary
c.
SELECT employee_id, salary FROM employees WHERE salary >= 100000 AND salary <= 200000 ORDER BY
salary
d.
SELECT employee_id, salary FROM employees WHERE salary *12 >= 100000 AND salary *12 <= 200000
ORDER BY salary
Display employee’s name and id whose firstname starts with letter D and job id is SA_REP. Sort the
output by department.
Select one:
a.
SELECT employees FROM employee_id, first_name, last_name WHERE first_name LIKE ‘D%’ and job_id =
‘IT_PROG’ ORDER BY department_id
b.
SELECT employee_id, first_name, last_name FROM employees WHERE job_id = ‘IT_PROG’ OR first_name
LIKE ‘D%’ and ORDER BY department_id
c.
SELECT employee_id, first_name, last_name FROM employees WHERE first_name LIKE ‘D%’ and job_id =
‘IT_PROG’ ORDER BY department_id
d.
e.
Which of the following SELECT statement is the correct report that will rename the column DESCRIPTION
to TITLE, PARTNUM to ID and ONHAND to STOCK?
Select one:
a.
SELECT DESCRIPTION NEW AS TITLE, PARTNUM NEW AS ID, ONHAND NEW AS STOCK FROM PARTS;
b.
c.
d.
SELECT DESCRIPTION RENAME AS TITLE, PARTNUM RENAME AS ID, ONHAND RENAME AS STOCK FROM
PARTS;
Which of the following is the correct report that will display the CLASS from table PARTS.
Select one:
a.
b.
c.
d.