الانتقال إلى المحتوى
View in the app

A better way to browse. Learn more.

مجموعة مستخدمي أوراكل العربية

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

مساعدة في حل سؤالين ... فهموني المطلوب اية ؟؟؟

Featured Replies

بتاريخ:

Consider a table called carrecords with the following structure:

name (type: TEXT)
price (type: INT)
color (type: TEXT)

vehicletype (type: TEXT) eg. SEDAN/SUV

 

 

A customer wants to see the details (name, price, color, vehicletype) of the vehicles that suit his preferences. This is what he says:

"If its a black sedan, I'm ready to pay 10,000, but if its red or white, then no more than 8,000. For any other color I won't go above 7,000, except if its an SUV, in which case my budget is upto 15,000 for a black one or upto 14,000 for any other color."

 

   Write a query that returns the desired information in ascending order of price.

 

دي كانت المشكلة الاولي انا مش عارف احلها ازاي الراجل طالب حاجات كتيرة جدااا عشان كدة مش عارف اكتب جملة ال select  اصلا بالتحديد هكتب اية بعد where 

 

فكرت في ال merge بس مش عارف اعملها خالص بيها هل انا كدة بفكر صح ولا فية حاجة تقدر تساعدني احل المطلوب

 

 

 

المشكلة الثانية 

 

 

Consider the following tables:

department
----------
deptid (type: INT)
deptname (type: TEXT)
hours (type: INT)
active (type: BIT)

employee
--------
empid (type: INT)
empname (type: TEXT)
deptid (type: INT)
designation (type: TEXT)
salary (type: INT)

Write a query to return the columns empname and deptname of the employees belonging to those departments that have a head count of 4 or more. The records should be returned in alphabetical order of empname.

 

 

المشكلة دي انا عارف نصها يعني لو كان قاللي عايز اسماء الموظفين والادارات كنت هستخدم ال join كان شرط الربط هيبقي كدة 

 

where deptid.department = deptid.employee  انما اللي معمول ب اللون الاحمر دة معناة اية هل معناة عايز اول اربع صفوف أو عابز من اول الصف الرابع وازاي اعمل الحركة دي 

 

 ارجوكم ساعدوني انا لسة مبتدئ في الاوراكل واهوة بذاكر sql وبحاول احل تاسكات ذي دي علي النت كتييير جداااا عشان ابقي قوي فيها 

 

 

 

 

 

 

 

بتاريخ:
  • كاتب الموضوع

يا خبراء الاوراكل اين انتم ؟؟؟ 

بتاريخ:
  • كاتب الموضوع

شكرا علي التجاهل التام لسؤالي كأنني احمق أو ما شابة  يبدوا انني دخلت مدينة الاشباح !!!!  :(  :(  :(  :(  :(

بتاريخ:

حياك الله اخي لم تدخل الى مدينة الاشباح

حل السؤال الاول

select name,color,vehicletype,price from carrecords
where
(vehicletype='sedan'and color='black'and price<=10000)

or
(vehicletype='sedan'and color in ('white','red')and price<=8000)
or
(vehicletype='sedan'and color not in  ('white','red','black')and price<=7000)
or
(vehicletype='SUV'and color = 'black'and price<=15000)
or
(vehicletype='SUV'and color <> 'black'and price<=14000)
order by price;

حل السؤال الثاني

select empname,deptname from empoyee join department using (deptid)
where employee.deptid in (select deptid from employee 
group by deptid 
having count(deptid)>=4)
order by empname;

تم تعديل بواسطة jadquraan

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

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

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

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

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

Account

Navigation

البحث

إعداد إشعارات المتصفح الفورية

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.