بتاريخ: 27 فبراير 200818 سنة comment_123469 إخواني ارجو مساعدتي في هذا الموضع هل هناك طريقة لعمل التالي : select sum(qui) where stock = '0' sum(qui) where stock = '1' sum(qui) where stock = '2' sum(qui) where stock = '3' sum(qui) where stock = '4' sum(qui) where stock = '5' sum(qui) where stock = '6' sum(qui) where stock = '7' from transaction كيف ممكن اعمل مجاميع لكل صنف في جملة واحدة ؟ هل ممكن تقديم بلاغ
بتاريخ: 27 فبراير 200818 سنة comment_123476 SELECT SUM (qui), stock FROM TRANSACTION GROUP BY stock SELECT SUM (qui) FROM TRANSACTION WHERE stock = :stock تم تعديل 27 فبراير 200818 سنة بواسطة K a n d i L تقديم بلاغ
بتاريخ: 22 يوليو 201510 سنة comment_264821 select sum(emp_sal) from emp where DEPTNO=1 union select sum(emp_sal) from emp where DEPTNO=2 union select sum(emp_sal) from emp where DEPTNO=1 union select sum(emp_sal) from emp where DEPTNO=4 union select sum(emp_sal) from emp where DEPTNO=1 union select sum(emp_sal) from emp where DEPTNO=5; تقديم بلاغ
بتاريخ: 22 يوليو 201510 سنة comment_264827 لو عايزهم جنب بعض select ...... from ..... , (select ....... from......) ); تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.