Subject Re: [ib-support] SELECT STATMENT
Author Herbert.Augustiny@sptroth.com
Give this a try:

SELECT Item_Code, count(bille_NO) FROM Your_Table GROUP BY Item_Code;

Regards,

Herbert



|---------+---------------------------->
| | "Ben Johnson" |
| | <ben_johns@rediff|
| | mail.com> |
| | |
| | 30.01.2002 17:21 |
| | Please respond to|
| | ib-support |
| | |
|---------+---------------------------->
>--------------------------------------------------------------------------------------------------------------------------------------------------|
| |
| To: ib-support@yahoogroups.com |
| cc: |
| Subject: [ib-support] SELECT STATMENT |
>--------------------------------------------------------------------------------------------------------------------------------------------------|





Hi,

can somebody show me how to write a select statment to display
how many times an item is billed from the following data.


Bill No. Item Code Batch Code
------------------------------------------
1 2 3
1 2 1
1 3 4
1 1 2

2 3 4
2 4 5

3 3 4
3 2 1
3 1 2
3 3 6



The select statment should return

Item Code Billed
----------------------
1 2
2 2
3 3
4 1

Billed column should show under how many bills that particular Item code is
appearing, need to consider only an item once if it is appearing once or
more than once in a bill.

Thank you.

Ben



To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/