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

طريقة عمل RECORD GROUP من الإستعلام

Featured Replies

بتاريخ:

DECLARE
 RG RECORDGROUP;
 I NUMBER;
BEGIN
 RG := FIND_GROUP('GR_NAME');
 IF ID_NULL(RG) THEN
   RG := CREATE _GROUP_FROM_QUERY('GR_NAME', 'SELECT EMPNO, COMM FROM EMP);
 END IF; 
 I := POPULATE_GROUP(RG);
 CLEAR_LIST('MY_LIST');
 POPULATE_LIST('GR_NAME', RG);
END;


___________________________________________________________________________
1/في البداية نقوم بتعريف متغير من نوع ريكورد قروب ومتغير من نوع رقم
2/بعد ذلك نقوم بعملية تشييك ما إذا كانت القروب موجودة
3/اذا لم يكن موجودا , نقوم بإنشاءه عن طرق استخدام create_group_from_query
3/بعد ذلك نقوم بتسكين البيانات في القرووب عن طريق populate_group
4/بعد ذلك نقوم بعمل وضع القيم من القروب في ال list item

أرجو من الله أنني وفقت في شرح هذا الموضوع

  • بعد 1 شهر...
بتاريخ:

شكرا على هذا الموضوع الجميل

  • بعد 5 شهور...
بتاريخ:

جزاكم الله خيرا

  • بعد 6 شهور...
بتاريخ:

بارك الله فيك

  • بعد 1 شهر...
بتاريخ:

ألف شكر على الدرس..

بتاريخ:

SQL: GROUP BY Clause

--------------------------------------------------------------------------------

The GROUP BY clause can be used in a SELECT statement to collect data across multiple records and group the results by one or more columns.

The syntax for the GROUP BY clause is:

SELECT column1, column2, ... column_n, aggregate_function (expression)
FROM tables
WHERE predicates
GROUP BY column1, column2, ... column_n;

aggregate_function can be a function such as SUM, COUNT, MIN, or MAX.



Example using the SUM function
For example, you could also use the SUM function to return the name of the department and the total sales (in the associated department).

SELECT department, SUM(sales) as "Total sales"
FROM order_details
GROUP BY department;


Because you have listed one column in your SELECT statement that is not encapsulated in the SUM function, you must use a GROUP BY clause. The department field must, therefore, be listed in the GROUP BY section.



Example using the COUNT function
For example, you could use the COUNT function to return the name of the department and the number of employees (in the associated department) that make over $25,000 / year.

SELECT department, COUNT(*) as "Number of employees"
FROM employees
WHERE salary > 25000
GROUP BY department;



Example using the MIN function
For example, you could also use the MIN function to return the name of each department and the minimum salary in the department.

SELECT department, MIN(salary) as "Lowest salary"
FROM employees
GROUP BY department;



Example using the MAX function
For example, you could also use the MAX function to return the name of each department and the maximum salary in the department.

SELECT department, MAX(salary) as "Highest salary"
FROM employees
GROUP BY department;

  • بعد 6 شهور...
بتاريخ:

شكرااااااااااااا

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

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

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

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

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

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.