الانتقال إلى المحتوى

سؤالين مهمين فى التمارين اللى موجود فى ماتريل 9i


mezo4ever

Recommended Posts

عندي سؤالين
Write a query that displays the difference between the highest and lowest salaries. Label the
column DIFFERENCE.
من جدول الموظفين
--------------------------------------------

Create a query that displays the employees’ last names and indicates the amounts of their
annual salaries with asterisks. Each asterisk signifies a thousand dollars. Sort the data in
descending order of salary. Label the column EMPLOYEES_AND_THEIR_SALARIES.


دى التمارين اللى موجود فى الماتريل بتاعت 9i

رابط هذا التعليق
شارك

  • بعد 2 أسابيع...

أخى الكريم هذه أجابة السؤال الثانى

SELECT rpad(last_name, 8)||' '|| 
   rpad(' ', salary/1000+1, '*')
		   EMPLOYEES_AND_THEIR_SALARIES
FROM  employees
ORDER BY salary DESC;



اسألك الدعاء لى و المسلمين

أخى الكريم هذه أجابة السؤال الثانى

SELECT rpad(last_name, 8)||' '|| 
   rpad(' ', salary/1000+1, '*')
		   EMPLOYEES_AND_THEIR_SALARIES
FROM  employees
ORDER BY salary DESC;


بالنسبه للسؤال الأول

SELECT   MAX(salary) - MIN(salary) DIFFERENCE
FROM	 employees;



اسألك الدعاء لى و المسلمين

رابط هذا التعليق
شارك

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   تمت استعادة المحتوى السابق الخاص بك.   مسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

جاري التحميل
×
×
  • أضف...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية