Subject SELECT STATMENT
Author Ben Johnson
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