2005 Oct 30 1:38 PM
Hi experts,
Could any one give me the good example of select statement with group by clause(for ex:BSAK table).
reward guaranteed..
Kaki
2005 Oct 30 2:28 PM
lets consider we have 3 fields in an database table :
MATNR, WERKS, KMENG.
Values are : 100, 1000, 50.00
100, 1001, 80.00
100, 1001, 60.00
101, 1005, 100.00.
Now i can use group by to get the average of quantities (MENGE) for a given material and plant.
Select MATNR WERKS AVG (MENGE)
into itab
from dtab
group by MATNR.
So itab contents are : 100, 1000, 50.00
100, 1001, 70.00
101, 1005, 100.00
Hope it was useful.
Hi experts,
Could any one give me the good example of select statement with group by clause(for ex:BSAK table).
reward guaranteed..
Kaki
2005 Oct 30 2:28 PM
lets consider we have 3 fields in an database table :
MATNR, WERKS, KMENG.
Values are : 100, 1000, 50.00
100, 1001, 80.00
100, 1001, 60.00
101, 1005, 100.00.
Now i can use group by to get the average of quantities (MENGE) for a given material and plant.
Select MATNR WERKS AVG (MENGE)
into itab
from dtab
group by MATNR.
So itab contents are : 100, 1000, 50.00
100, 1001, 70.00
101, 1005, 100.00
Hope it was useful.
2005 Oct 30 2:36 PM
Hi Sarath
Thanks for ur reply.
It is not showing radio buttons to award points.
Kaki
2005 Oct 31 2:09 AM
2005 Oct 31 3:03 AM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |