Hi! I need help with a query i want to make that i just cant figure out.
I have an Object Billitem with the columns - billitemid, billid, itemid, taxid and Billitemoption with columns - billitemoptionid, billitemid, optionid
billid refers to the object Bill, itemid to the Object Item, taxid to Tax, billitemid to Billitem and option id to Option.
A Bill can have several Billitems which in turn can have different billitemoptions, and my problem is that i want to count how many of each Billitem with distinct billitemoptions there is in a Bill. And i would also like the query to return the distinct Billitems with the corresponding amounts of each distinct item in a List or something.
|