skiming بتاريخ: 11 نوفمبر 2008 تقديم بلاغ مشاركة بتاريخ: 11 نوفمبر 2008 السلام عليكم ورحمة الله وبركاتهالله يسلمكم عندي 13 سؤال وماعرفت جوابهم لأن توني الحين مبتدأ أبي حلهم وماأتوقع يكونوا صعبين عليكمالسلام عليكم ورحمة الله وبركاتهالله يسلمكم عندي 13 سؤال وماعرفت جوابهم لأن توني الحين مبتدأ أبي حلهم وماأتوقع يكونوا صعبين عليكمالسؤال الأولA) List names of all employees who work in DALLAS List NAME, DEPARTMENT NUMBER, and SALARY for all employees with the comment HIGHEST PAID next to the salary of those employees whose is highest in their departmentC) List NAME, DEPARTMENT NO, and SALARY for all employees who earn more than the maximum salary of an employes in the RESEARCH departmentD) List NAME, JOB of all employees, and: The Employee's salary if employee earn more than 1500; The message MET THE TARGET if employee earn exactly 1500; The message BELOW 1500 if employee earn than 1500E) List employee name, employee number, and job of all employee who do not work in department 20 or 30F) List name and salary of all employee who earn more than the average salary of an employee in their departmentG) List name and salary of the highest paid employee beside the PRESIDENTH) List name of all employee that have exactly two A's in the name (not necessarily consecutive)I) List name and salary of all employee who earn less than immediate subordinatesJ) List name of all department that have no employeeK) List employee name,job,salary,grade, and department Name of all employee except clerks. Sort on salary displaying highest salary firstL) Write a SQL query that would accept a string as a parameter, and verify that it is in the format m*n, where m, and n are alphabets. Your query should display the parameter string together with a 'Y' if the string format is valid, 'N' otherwiseالأجابات لاهنتوا وفي وقت لاحق سوف أضع الإجابات التي قمت بالإجابه عليهاتحياتي اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
khaledmega بتاريخ: 18 نوفمبر 2008 تقديم بلاغ مشاركة بتاريخ: 18 نوفمبر 2008 السلام عليكم A – SELECT ENAME , DNAME FROM EMP E , DEPT D WHERE E.DEPTNO = D.DEPTNO AND E.DEPTNO IN (SELECT DEPTNO FROM DEPT WHERE LOC ='DALLAS') ; ----- B - SELECT ENAME , MAX(SAL) , DEPTNO FROM EMP WHERE (SAL ,DEPTNO) IN ( SELECT MAX(SAL), DEPTNO FROM EMP GROUP BY DEPTNO) GROUP BY ENAME , DEPTNO ; ------------ C – SELECT ENAME , DEPTNO , SAL FROM EMP WHERE SAL >ALL ( SELECT SAL FROM EMP WHERE DEPTNO = (SELECT DEPTNO FROM DEPT WHERE DNAME = 'RESEARCH')) ; ------------- D – برجاء تحديد حل هذا السؤال هل تريده من خلال السيكول ام البي ال ؟ ------------------- E – SELECT ENAME , EMPNO , JOB FROM EMP WHERE DEPTNO NOT IN (20 , 30) ; -------------------- F – SELECT ENAME , DEPTNO FROM EMP WHERE SAL > ( SELECT AVG(SAL) FROM EMP ) ORDER BY 2 ; ------------------- G – السؤال غير مفهوم الرجاء التوضيح ----------------- H – الذى فهمته انك تريد من يوجد بثاني حرف من اسمه حرف A واليك الاجابة على هذا النحو SELECT ENAME FROM EMP WHERE ENAME LIKE ('_A%') ; --------------------------- I – السؤال غير مفهوم الرجاء التوضيح ----------------------- J – SELECT ENAME , DNAME FROM EMP E , DEPT D WHERE E.DEPTNO(+) = D.DEPTNO AND E.DEPTNO IS NULL ; ---------------------- K – SELECT ENAME , JOB , SAL , GRADE , DNAME FROM EMP E , DEPT D , SALGRADE WHERE E.DEPTNO = D.DEPTNO AND SAL BETWEEN LOSAL AND HISAL AND JOB <> 'CLERK' ORDER BY SAL DESC ; ---------------- L – السؤال غير مفهوم الرجاء التوضيح وشكراميجا اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
skiming بتاريخ: 23 نوفمبر 2008 كاتب الموضوع تقديم بلاغ مشاركة بتاريخ: 23 نوفمبر 2008 (معدل) D) List NAME, JOB of all employees, and: The Employee's salary if employee earn more than 1500; the message MET THE TARGET if employee earn exactly 1500; the message BELOW 1500 if employee earn than 1500هالسؤال في SQL حله وهني راح يكون إستخدام Decode==================================== H) List name of all employee that have exactly two A's in the name (not necessarily consecutive هذا السؤال يقصد به كل شخص في اسمه حرف A مكرر مرتينمثال ADAMSيحتوي على حرفينAliيحتوي على حرف واحد فقط فأنه لن يظهر في الكود فقط الذين يحتون على حرفين سيظهرونأنا جربت هالكودSelect ename From emp Where ename like '%A%A%';وعطاني المطلوب========================I) List name and salary of all employee who earn less than immediate subordinatesهذا السؤال يعني راتب الموظفين الذين يأخذون راتب أقل من المسؤول عنهممثال المدير يأخذ 5000 الموظفين اللي تحته من يأخذون أقل منه ========================G) List name and salary of the highest paid employee beside the PRESIDENTالسؤال يقصد به جميع الموظفين الذين يستلمون أعلى راتب بعد الموظف الذي رتبته PRESIDENT وتسلم على التعاون أخوي وماقصرتتحياتي تم تعديل 23 نوفمبر 2008 بواسطة skiming اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
Recommended Posts
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.