السلام عليكم ورحمه الله وبركاته
ازيكم يا جماعه...النهارده محضر ليكم سؤالين من اسئله الامتحان الاول سهل والتانى برضه سهل بس محتاج شويه تركيز
السؤال الاول
Evaluate this SQL statement:
SELECT ename, sal, 12*sal+100
FROM emp;
The SAL column stores the monthly salary of the employee. Which change must be made to the above
syntax to calculate the annual compensation as "monthly salary plus a monthly bonus of $100, multiplied
by 12"?
A.No change is required to achieve the desired results.B. SELECT ename, sal, 12*(sal+100)
FROM emp;
C. SELECT ename, sal, (12*sal)+100
FROM emp;
D. SELECT ename, sal+100,*12
FROM emp;
السؤال الثانى
Examine the structure of the EMP_DEPT_VU view:
Column Name Type Remarks
EMPLOYEE_ID NUMBER From the EMPLOYEES table
EMP_NAME VARCHAR2(30) From the EMPLOYEES table
JOB_ID VARCHAR2(20) From the EMPLOYEES table
SALARY NUMBER From the EMPLOYEES table
DEPARTMENT_ID NUMBER From the DEPARTMENTS table
DEPT_NAME VARCHAR2(30) From the DEPARTMENTS table
Which SQL statement produces an error?
A. SELECT *
FROM emp_dept_vu;
B. SELECT department_id, SUM(salary)
FROM emp_dept_vu
GROUP BY department_id;
C. SELECT department_id, job_id, AVG(salary)
FROM emp_dept_vu
GROUP BY department_id, job_id;
D. SELECT job_id, SUM(salary)
FROM emp_dept_vu
WHERE department_id IN (10,20)
GROUP BY job_id
HAVING SUM(salary) > 20000;
E. None of the statements produce an error; all are valid.
بلا نحاول نجاوب سوا عليهم ويارب يوقفنى واياكم للخير دايما
المفضلات