100% found this document useful (1 vote)
29 views35 pages

Prog-ORACLE 1stQ Exam

AMA OED

Uploaded by

takingmedicinern
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
29 views35 pages

Prog-ORACLE 1stQ Exam

AMA OED

Uploaded by

takingmedicinern
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 35

PROG3113 1ST Quarter

EXAM

Programming Java (AMA Computer


University)

Scan to open on Studocu

Downloaded by stelle nolastname


Studocu is not sponsored or endorsed by any college or university

Downloaded by stelle nolastname


BAED-PROG3113 Programming (Oracle
Database) NC III Part 1
1. Home
2. My courses
3. BAED-PROG3113-2212S
4. Quarterly Examination
5. First Quarter Exam

Started on Thursday, 3 November 2022, 8:55 AM


State Finished
Completed on Thursday, 3 November 2022, 9:07 AM
Time taken 12 mins 23 secs
Marks 45.00/50.00
Grade 90.00 out of 100.00
Question 1
Correct
Mark 1.00 out of 1.00

Flag question

Question text
ANSI SQL commands cannot be
abbreviated.

Select one:
True
False

Question 2
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
Aldrin wants to know the outstanding total balance on hand on every class
per warehouse.

Downloaded by stelle nolastname


Select one:

a.
SELECT warehouse, class, sum(onhand) FROM parts GROUP BY
warehouse, class

b.
SELECT warehouse, class, onhand FROM parts GROUP
BYsum(warehouse), sum(class);

c.
SELECT TOTAL(warehouse), TOTAL(class), TOTAL(onhand) FROM parts
GROUP BY warehouse, class

d.

Question 3
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
Evaluate the following SQL command
SELECT employee_id, salary, department_id FROM employees WHERE
department_id IN (60,70)

Select one:

a.
The SQL command will give an incorrect output.

b.
The SQL command will display employees with department id 60 and 70.

c.
The SQL command will display employees with department id 60 or 70.

d.
The SQL command will produce an error.

Question 4
Correct

Downloaded by stelle nolastname


Mark 1.00 out of 1.00

Flag
question
Question text
Which of the following SQL command will display the summary table
showing the total quantity on hand per class.

Select one:

a.
SELECT class, sum(onhand) AS "QTY ON HAND" FROM parts GROUP BY
class

b.
SELECT class, sum(onhand) AS "QTY ON HAND" FROM parts GROUP BY
onhand

c.
SELECT class, TOTAL(onhand) AS "QTY ON HAND" FROM parts GROUP BY
class, onhand

Question 5
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
John want to know how many employees receiving salary below
10,000. What SQL command he need to run?

Select one:

a.
SELECT COUNT(emp_id) FROM employees WHERE salary <= 10000;

b.
SELECT COUNT(salary) FROM employees WHERE salary < 10,000;

Downloaded by stelle nolastname


c.
SELECT salary FROM COUNT(employees)WHERE salary < 10000;

d.
SELECT COUNT(*) FROM employees WHERE salary < 10000;

Question 6
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
Which of the following SELECT statement is the correct PL/SQL that
willcreate a report specifying only the column PRICE, ONHAND and
DESCRIPTION?

Select one:

a.
SELECTONHAND,PRICE ,DESCRIPTION FROM PARTS;

b.
SELECT PRICE, ONHAND, DESCRIPTION FROM PARTS;

c.
SELECT (ONHAND||PRICE ||DESCRIPTION FROM PARTS;

d.

Question 7
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
Which of the following SQL command that the DBA will run to provide Matt
to create a table in the Oracle Database.

Downloaded by stelle nolastname


Select one:

a.
GRANT ACCESS matt TO create table

b.
GRANT matt create table

c.
GRANT create table TO matt

d.
GRANT matt TO create table

Question 8
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
Display employee's name and id whose firstname starts with letter D
and job id is IT_PROG.
Sort the output by department.

Select one:

a.
SELECT employee_id, first_name, last_name FROM employees WHERE
job_id = 'IT_PROG' OR first_name LIKE 'D%' and ORDER BY
department_id

b.
SELECT employee_id, first_name, last_name FROM employees WHERE
first_name LIKE 'D%' and job_id = 'IT_PROG' ORDER BY department_id

c.
SELECT employees FROM employee_id, first_name, last_name WHERE
first_name LIKE ‘D%’ and job_id = ‘IT_PROG’ ORDER BY department_id

d.
SELECT employee_id, first_name, last_name FROM employees
ORDER BY department_id WHERE first_name LIKE 'D%' and
job_id = 'IT_PROG'

Downloaded by stelle nolastname


Question 9
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
List all employees except for IT_PROG

job id. Select one:

a.
SELECT *FROM employees WHERE JOB_ID NOT IN ('IT_PROG')

b.
SELECT *FROM employees EXCEPT JOB_ID != 'IT_PROG'

c.
SELECT *FROM employees WHERE JOB_ID <> 'IT_PROG'

d.
All of the choices

Question 10
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
Matt wants to change his password from 1234 to
abcd. Which of the following will perform the task?

Select one:

a.
ALTER USER matt IDENTIFIED abcd;

b.
UPDATE PASSWORD 1234 TO abcd FROM matt

Downloaded by stelle nolastname


c.
UPDATE matt WITH abcd

d.
CHANGE USER matt PASSWORD abcd

e.
User matt cannot change his password. DBA has only the rights to
change the password

Question 11
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
You want to display the employee's last name whose salary is below
10,000. Which SQL statement give the required output format of
the salary?
Required output :

Select one:

a.
SELECT last_name, TO_CHAR(salary, '$999,999.99') AS "MONTHLY
SALARY"
FROM employees WHERE salary < 10000

Downloaded by stelle nolastname


b.
SELECT last_name, TO_INTEGER(salary, $999,999.99) AS "MONTHLY
SALARY"
FROM employees WHERE salary < 10000

c.
SELECT last_name, TO_NUMBER(salary, '$999,999.99') AS "MONTHLY
SALARY"
FROM employees WHERE salary < 10,000

d.

Question 12
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
Command use to display table structure

Select one:

a.
DESCRIB
E

b.
DISPLAY STRUCTURE

c.
DISPLAY TABLE

d.

Question 13
Correct
Mark 1.00 out of 1.00

Flag
question

Downloaded by stelle nolastname


Question text
Display all the records in the employee table. Arrange the output in by
lastname from A-Z order.

Select one:

a.
SELECT * FROM employees ORDER BY lastname AZ

b.
SELECT * FROM employees SORT BY lastname ascending

c.
SELECT * FROM employees ORDER BY lastname

d.
SELECT * FROM employees SORT BY lastname

Question 14
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
You want to display all the employee id and the month an employee
was hired excluding employees whose job id is AD_VP. Which SQL
statement give the required output?

Select one:

a.
SELECT employee_id, hire_date, MONTH(hire_date,'Month') AS "Hired Month", job_id FROM
employees WHERE job_id EXCLUDE ('AD_VP');

b.
SELECT employee_id, hire_date, TO_MONTH(hire_date,'Month') AS
"Hired Month", job_id FROM employees WHERE job_id NOT
('AD_VP');

c.
SELECT employee_id, hire_date, TO_DATE(hire_date,'Month') AS "Hired
Month", job_id FROM employees WHERE job_id NOT = 'AD_VP';

Downloaded by stelle nolastname


d.
SELECT employee_id, hire_date, TO_CHAR(hire_date,'Month') AS "Hired
Month", job_id FROM employees WHERE job_id NOT IN ('AD_VP');

Question 15
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
Display the lastname of every employee in the company. Display the
output in a single column and label it as Fullname
Format:

JuanReyes Select

one:

a.
SELECT CONCAT(first_name, last_name) FROM employees

b.
SELECT CONCAT(first_name, last_name) AS Fullname FROM employees

c.
None of the choices

d.
Question 16
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
Austin David was transferred to Purchasing Department. You are
assigned to update the database.
Which of the following SQL command will satisfy the requirements?

Select one:

Downloaded by stelle nolastname


a.
UPDATE employees WHERE department_id = 30 SET first_name =
‘David’ AND last_name = ‘Austin’

b.
UPDATE department_id = 30 WHERE first_name = ‘David’ AND
last_name = ‘Austin’

c.
UPDATE first_name = ‘David’ AND last_name = ‘Austin’ FROM
employees SET department_id = 30

d.
UPDATE employees SET department_id = 30 WHERE first_name =
‘David’ AND last_name = ‘Austin’

Question 17
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
You want to display the employee's id and formatted date hired as shown
below. Which SQL statement give the required output?
Required output :

Select one:

Downloaded by stelle nolastname


a.
SELECT employee_id, TO_DATE (hire_date, 'format Month DD, YYYY') AS
"Hired Date" FROM employees;

b.
SELECT employee_id, TO_CHAR(hire_date, 'fmMonth DD, YYYY') AS
"Hired Date" FROM employees;

c.
SELECT employee_id, TO_CHAR(hire_date, 'Month DD, YYYY') AS "Hired
Date" FROM employees;

d.
SELECT employee_id, format(TO_DATE(hire_date, 'Month DD, YYYY')) AS
"Hired Date" FROM employees;

Question 18
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
You want to generate the total salary per month of every department
in the company.

Select one:

a.
SELECT department_id, salary FROM employees GROUP BY
SUM(salary) ORDER BY department_id

b.
SELECT department_id, salary FROM employees ORDER BY SUM(salary)

c.
SELECT department_id, SUM(salary) FROM employees GROUP BY
department_id

d.
SELECT department_id, TOTAL(salary) FROM employees GROUP BY

Downloaded by stelle nolastname


Question 19
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
Which of the following SQL command will display all records with part
number contains the number 9?

Select one:

a.
SELECT * from parts WHERE partnum LIKE '%9%'

b.
SELECT * FROM parts WHERE partnum IN ('%9%')

c.
SELECT partnum FROM parts WHERE partnum = ‘%9%’

d.
SELECT partnum FROM parts WHERE partnum BETWEEN = ‘%9%’

Question 20
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
You want to display all the employee id and the month an employee was
hired. Which SQL statement give the required output?

Select one:

a.
SELECT employee_id, hire_date, MONTH(hire_date,'Month') AS "Hired
Month", job_id FROM employees

Downloaded by stelle nolastname


b.
SELECT employee_id, hire_date, TO_DATE(hire_date,'Month') AS "Hired
Month", job_id FROM

c.
SELECT employee_id, hire_date, TO_MONTH(hire_date,'Month') AS
"Hired Month", job_id FROM employees

d.
SELECT employee_id, hire_date, TO_CHAR(hire_date,'Month') AS "Hired
Month", job_id FROM employees

Question 21
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
You want to display the employee id and the year when an employee was
hired. Which SQL statement give the required output?

Select one:

a.
SELECT employee_id, YEAR(hire_date') FROM employees;

b.
SELECT employee_id, TO_CHAR(hire_date,'YYYY') FROM employees;

c.
SELECT employee_id, YEAR(hire_date,'YYYY') FROM employees;

d.
SELECT employee_id, TO_YEAR(hire_date,'YYYY') FROM employees;

Question 22
Correct
Mark 1.00 out of
1.00

Downloaded by stelle nolastname


Flag
question
Question text
True or False. The AND, OR, NOT are comparison operators.

Select one:
True
False

Question 23
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
Display the employee id, salary, number of years and the hiring date of
every employee in the company.

Select one:

a.
SELECT employee_id,salary, hire_date, hire_date- SYSDATE /365
FROM employees;

b.
SELECT employee_id, salary, hire_date, hire_date /365 FROM employees;

c.
SELECT employee_id, salary, hire_date, ROUND((SYSDATE - hire_date)
/365,0) FROM employees;

Question 24
Correct
Mark 1.00 out of 1.00

Downloaded by stelle nolastname


Flag
question
Question text
Display the name, jobs id and salary of the all the employees whose
department id is 100 and salary is below 8000. Arrange the output by
salary in ascending order.

Select one:

a.
SELECT first_name, last_name, salary FROM employees ORDER BY salary
WHERE department_id = 100 AND salary > 8000

b.
SELECT name, salary FROM employees WHERE department_id = 100 AND
salary
< 8000 ORDER BY salary ASC

c.
SELECT first_name, last_name, salary FROM employees WHERE
department_id = 100 AND salary < 8000 ORDER BY salary

d.
SELECT employees FROM first_name, last_name, salary WHERE
department_id = 100 AND salary < 8000 ORDER BY salary ASC

e.
SELECT first_name, last_name, salary FROM employees WHERE salary
< 8000 AND department_id = 100 AND ORDER BY department_id

f.
SELECT name FROM employees WHERE salary < 8000 AND
department_id = 100 AND ORDER BY department_id

Question 25
Correct
Mark 1.00 out of 1.00

Flag
question

Downloaded by stelle nolastname


Question text
Display a summary table of the total quantity on hand above 50 very
class per warehouse

Select one:

a.
SELECT warehouse, class, sum(onhand) FROM parts GROUP BY
warehouse,class HAVING SUM(ONHAND) > 50

b.
SELECT warehouse, class, sum(onhand) FROM parts WHERE
SUM(ONHAND) > 50

c.
SELECT warehouse, class, sum(onhand) FROM parts GROUP BY
warehouseWHERE SUM(ONHAND) > 50

d.
SELECT warehouse, class, sum(onhand) FROM parts GROUP BY
Question 26
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
Evaluate the following SQL command
SELECT * FROM jobs WHERE job_title LIKE

'Manager%' Select one:

a.
The SQL command will display all records in the database

b.
No records will be displayed

c.
The SQL command will display all employees with Manager position

d.

Downloaded by stelle nolastname


The SQL command will produce an error.

Question 27
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
SQL stands for

Select one:

a.
Standard Question Language

b.
Standard Query Language

c.
Structured Query Language

d.
Sequential Query Level

e.
Structure Query Level

Question 28
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
There was 10% price increase in the all the parts in warehouse
number 3. The Store Manager asked the Database Administrator to
generate a report showing the part number, the old and new price.
Which of the following SQL statement would satisfy the requirement of the
Store Manager.

Downloaded by stelle nolastname


Select one:

a.
SELECT partnum, price, price * 1.10% FROM parts WHERE warehouse
=3

b.
SELECT partnum, price, price * 0.1 FROM parts WHERE warehouse = 3

c.
SELECT partnum, price, price * 10% FROM parts WHERE warehouse =
3

Question 29
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
You want to display the employee's last name whose salary is below
10,000 and whose lastname starts with letter D.
Which SQL statement give the required output format of the

salary? Select one:

a.
SELECT last_name, TO_NUMBER(salary, '$999,999.99') AS "MONTHLY
SALARY"
FROM employees WHERE salary < 10,000 WHERE last_name = ‘D%’

b.
SELECT last_name, TO_INT(salary, '$999,999.99') AS "MONTHLY SALARY"
FROM
employees WHERE salary < 10,000 WHERE last_name STARTS 'D%'

c.
SELECT last_name, TO_INTEGER(salary, $999,999.99) AS "MONTHLY SALARY"
FROM employees WHERE salary < 10000 WHERE last_name IN 'D%'

d.
SELECT last_name, TO_CHAR(salary, '$999,999.99') AS "MONTHLY SALARY"
FROM employees WHERE salary < 10000 WHERE last_name LIKE 'D%'

Downloaded by stelle nolastname


Question 30
Incorrect
Mark 0.00 out of 1.00

Flag
question
Question text
You want to display the employee id, date hired of all employees
whose hired date is September.
Which SQL statement give the required output?

Select one:

a.
SELECT employee_id, hire_date, TO_CHAR(hire_date, 'Month') AS "Hired
Month" FROM employees WHERE TO_DATE(hire_date, 'Month') =
TO_DATE(‘09’)

b.
SELECT employee_id, hire_date, TO_CHAR(hire_date, 'Month') AS "Hired
Month" FROM employees WHERE TO_CHAR(hire_date, 'MON') = 'SEP'

c.
SELECT employee_id, hire_date, TO_DATE(hire_date, 'Month') AS "Hired
Month" FROM employees WHERE TO_DATE(hire_date, 'MON') =
'SEP'

d.

Question 31
Correct
Mark 1.00 out of 1.00

Downloaded by stelle nolastname


Flag
question
Question text
The DBA will create a new user name sales.
Which of the following SQL command will perform the

creation? Select one:

a.
CREATE USER FR0M DB_USER SET user=’sales’ password=NULL

b.
CREATE sales ACCESS 1234

c.
CREATE USER sales IDENTIFIED BY 1234

d.
None of the choices

e.
CREATE USERNAME sales SET PASSWORD default

Question 32
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
TRUE OR FALSE.
A FOREIGN KEY is a field in one table that refers to the PRIMARY KEY in
another table.

Select one:
True
False

Downloaded by stelle nolastname


Question 33
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
Which of the following SELECT statement is the correct PL/SQL that will
display all rows and columns?

Select one:

a.
SELECT * FROM PARTS;

b.
SELECT ALL FROM PARTS;

c.
SELECT TABLE PARTS;

d.
SELECT FROM TABLE PARTS;

Question 34
Incorrect
Mark 0.00 out of 1.00

Flag
question
Question text
You want to cancel the privilege of matt to retrieve records from the
employees table.

Select one:

a.
REVOKE matt FROM employees TO select;

b.

Downloaded by stelle nolastname


REVOKE select ON employees FROM matt;

c.
REVOKE employees FROM matt TO select;

d.
REVOKE select ON matt FROM employees;

Question 35
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
Evaluate the following SQL command
SELECT employee_id, min_salary, max_salary FROM employees,
departments WHERE
salary>= 10000 && salary <=

20000 Select one:

a.
The SQL will display the employee id, department id and the minimum
and maximum salary whose salary is between 10000 and 20000.

b.
The SQL command will produce an error.

c.
The SQL will produce Cartesian Product

d.
The SQL command will give an incorrect output.

Question 36
Correct
Mark 1.00 out of 1.00

Flag
question

Downloaded by stelle nolastname


Question text
Which of the following will grant a query privileges on the STUDENT

table Select one:

a.
GRANT matt PRIVILEGE select TO student

b.
GRANT select ON student TO matt

c.
GRANT matt TO select student

d.
GRANT select TO matt ON student

Question 37
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
What privileges that manipulates the content of the database

objects. Select one:

a.
Object Privileges

b.
System Privileges

c.
Network Privileges

d.
Connection Privileges

Question 38
Incorrect
Mark 0.00 out of 1.00

Downloaded by stelle nolastname


Flag
question
Question text
Display the first 5 letter in the surname of all the employees whose
firstname starts with letter 'N'

Select one:

a.
SELECT SUBSTR(surname,1,5), first_name FROM employees WHERE
first_name
= 'N'

b.
SELECT SUBSTR(last_name,1,5), first_name FROM
employees WHERE SUBSTR(first_name,1,1) = 'N'

c.
SELECT SUBSTR(surname,1,5), first_name FROM employees WHERE
SUBSTR(first_name,1,1) IN 'N'

d.
SELECT SUBSTR(last_name,1,5), first_name FROM employees WHERE
first_name IN 'N'

e.
SELECT SUBSTR(last_name,1,5), first_name FROM

Question 39
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
Display the part number whose class is not HW, AG or SG.

Select one:

Downloaded by stelle nolastname


a.
SELECT partnum FROM parts WHERE class NOT IN = (‘HW’, AG’, SG’)

b.
SELECT partnum FROM parts WHERE class NOT IN ('HW', 'AG', SG')

c.
SELECT partnum FROM parts WHERE NOT IN class ('HW', 'AG', SG')

d.
None of the choices

Question 40
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
Which of the following SELECT statement is the correctreport the will merge
the column CLASS and PRICE rename the COLUMN as "CLASS PRICE".

Select one:

a.
SELECT ('CLASS'||'PRICE') AS "CLASS PRICE" FROM PARTS;

b.
SELECT (CLASS||PRICE) AS CLASS PRICE FROM PARTS;

c.
SELECT (CLASS||PRICE) AS "CLASS PRICE" FROM PARTS;

d.
SELECT (CLASS||PRICE) CLASS PRICE FROM PARTS;

Question 41
Correct
Mark 1.00 out of 1.00

Downloaded by stelle nolastname


Flag
question
Question text
What is the SQL command to count the number of records in the
employees table?

Select one:

a.
SELECT COUNT(*) FROM employees

b.
SELECT * FROM employees;

c.
SELECT SUM(*) FROM employees;

d.
SELECT ALL FROM employees

Question 42
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
You want to display all the job position titles whose salary is salary from
5,000 to 12,000 arrange from highest to lowest

Select one:

a.
SELECT job_title FROM jobs WHERE min_salary >= 5000 AND
max_salary<= 10000

b.
SELECT employees_id, job_title FROM employees WHERE salary >= 5000
AND salary <= 10000

Downloaded by stelle nolastname


c.
SELECT job_title FROM employees WHERE salary >= 5000 AND
salary <= 10000

d.

Question 43
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
Which of the following SELECT statement is the correct PL/SQL that will
display eliminate the duplicate rows for column class and warehouse.

Select one:

a.
SELECT DISTINCT CLASS, WAREHOUSE FROM PARTS;

b.
SELECT DISTINCT CLASS AND WAREHOUSE FROM PARTS;

c.
SELECT DISTINCT CLASS, DISTINCT WAREHOUSE FROM PARTS;

d.
SELECT DISTINCT CLASS AND DISTINCT WAREHOUSE FROM PARTS;

Question 44
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
Which of the following is NOT a task of a Database Administrator

Select one:

Downloaded by stelle nolastname


a.
Creating new users

b.
Removing users

c.
Removing tables

d.
Backing up tables

e.
None of the choices

Question 45
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
INSERT, DELETE, UPDATE are

commands Select one:

a.
DDL

b.
DML

c.
DCL

d.
Question 46
Correct
Mark 1.00 out of 1.00

Downloaded by stelle nolastname


Flag
question
Question text
What will be the SQL command if every employee will be given a
productivity bonus which is equivalent to 3% of the monthly salary?
Display the employee id, salary and the productivity

bonus. Select one:

a.
SELECT employee_id, salary, salary * .30 FROM employees

b.
SELECT employee_id, salary, salary + (salary .03) FROM employees

c.
SELECT employee_id, salary FROM employees WHERE salary)

d.
SELECT employee_id, salary, salary * .03 FROM employees

e.
SELECT employee_id, salary, salary * 1.03 FROM employees

Question 47
Incorrect
Mark 0.00 out of 1.00

Flag
question
Question text
Display the employee's name, job title, job_id and the department name of
employees with department id of 100.

Select one:

a.
SELECT E.employee_id, J.job_title, e.job_id,
D.department_name FROM jobs J

Downloaded by stelle nolastname


INNER JOIN department D ON E.job_id = J.job_id
INNER JOIN employees EON E.department_id =
D.department_id WHERE E.department_id = 100

b.
SELECT E.employee_id, J.job_title, e.job_id, D.department_name
FROM employees E
JOIN jobs J ON E.job_id = J.job_id
JOIN departments D ON E.department_id = D.department_id
WHERE E.department_id = 100

c.
SELECT E.employee_id, J.job_title, e.job_id, D.department_name
FROM jobs J
NATURAL JOIN department D ON E.job_id = J.job_id
NATURAL JOIN employees E ON E.department_id =
D.department_id WHERE E.department_id = 100

d.
SELECT E.employee_id, J.job_title, e.job_id, D.department_name
FROM employees E
JOIN department D ON E.job_id = J.job_id
JOIN jobs J ON E.department_id = D.department_id
WHERE E.department_id = 100

Question 48
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
You what to generate the average salary of all employees whose job
function is FI_ACCOUNT.
Which of the following SQL command will produce the

output. Select one:

a.
SELECT COUNT AVG(salary) FROM employees WHERE job_id =
'FI_ACCOUNT';

b.

Downloaded by stelle nolastname


c.
SELECT AVERAGE(salary) FROM employees WHERE job_id =
'FI_ACCOUNT';

d.

Question 49
Correct
Mark 1.00 out of 1.00

Flag
question
Question text
The following are capabilities of SQL

SELECT Select one:

a.
Grant priveledge, Add user

b.
Update, Delete, Add

c.
Create records, Remove Table, Edit record

d.
Projection, Selection, Join records

Question 50
Incorrect
Mark 0.00 out of 1.00

Flag
question
Question text
Evaluate the given SQL syntax
INSERT INTO table_name (column1, column2, column3, ...)
VALUES (value1, value2, value3, ...)
WHERE condition;
Select one:

Downloaded by stelle nolastname


a. INSERT should be UPDATE command
b. This will produce an error.
c. Correct syntax.
d. Wrong placement of WHERE and VALUES

Downloaded by stelle nolastname

You might also like