الانتقال إلى المحتوى
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

بتاريخ:

يا جماعة من فضلكم عايزة حل للسؤال الاتي ضروري جدا:
The HR department needs a list of countries that have no departments located in them. Display the country ID and the name of the countries؟ :blink:
لقد وجدت حل سابق في المنتدى ولكن ليس المطلوب لاني عايزة الحل ماخود من 3 جداول
countries
country_id
country_name

locations
location_id
location_name
country_id

departments
department_id
department_name
location_id

ولكم جزيل الشكر

بتاريخ:

ممكن توضحي اكثر

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

يعني انا عندي 3 جداول (COUNTRIES -DEPATMENTS -LOCATIONS) كل جدول يحتوي على الاعمدة الموضحة بالاعلى فانا اريد ولان جدول الدول لا يمكن ربطه مع جدول الاقسام الا باستخدام جدول المواقع فحيكون في لفة في الحل


واسفة اذا ما قدرت اوضح اكتر
شكرا

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

بتاريخ:

أخي العزيز ...
يا ريت التوضيح ما الذي تريد بالضبط
فإذا أردت الربط بين الجداول .. فإليك جملة Select التالية :

SELECT c.country_id, c.country_name, l.location_id, l.location_name, d.department_id, d.department_name
FROM country c , location l , department d
WHERE c.country_id = l.country_id
AND l.location_id = d.location_id

أرجو تجربة الجملة السابقة .

بتاريخ:

واحد من الحلول
تأكدي من الاخطاء الاملائيه

select c.country_id, c.country_name, 
from country c 
where c.country_id not in (
select distinct l.country_id
from locations l
where l.location_id in (
select distinct d.location_id 
from departments d
)
)

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

اخواني السلام عليكم
المراد من السؤال هو استرجاع اسماء وارقام الدول التي لا تحتوي على اقسام(DEPARTMENTS)
وهذه هي الجداول
countries
country_id
country_name

locations
location_id
location_name
country_id

departments
department_id
department_name
location_id

فجدول الاقسام لا يحتوي على country_id وهنا الفكرة في السؤال فسيتم الربط بين الجدولين باستخدام الجدول الثالث وهو جدول المواقع بواسطة (location_id)

وأعتذر ان كنت قد اسات ايصال الفكرة

بتاريخ:

أخي جربت الاستعلام اللي وضعته لك في الاعلى ؟؟

بتاريخ:

السلام عليكم
أتمنى أن يكون هذا ماتريد

select  country_id,country_name from countries where country_id in (( select country_id from locations left outer join departments on (locations.location_id
=departments.location_id) minus select country_id from locations  ,departments  where (locations.location_id
=departments.location_id)) ;




وفقك الله

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

شكرا للجميع على المساعدة

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

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

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

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

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

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.