I currently have a database where the primary key is the ticket number (tktno) there are also fields with invoice number (invno) and pax names (paxname) a sample is ...
tktno invno paxname invamt
1000 1 Mr. X 1000.00
1001 1 Mrs. X 750.00
1002 1 Mstr. X 750.00
2000 2 Mr. Y 1500.00
3000 3 Mr. Z 1000.00
3001 3 Mr. Z 1000.00
3002 3 Mr. Z 750.00
What I want to do is to count the pax names per invoice number. Even if the names are the same I want it to be counted.
I have tried a count where the details are
count(tblname.paxname, tblname.invno)
dosen't give me the right count, it's always more
what am I doing wrong???
tktno invno paxname invamt
1000 1 Mr. X 1000.00
1001 1 Mrs. X 750.00
1002 1 Mstr. X 750.00
2000 2 Mr. Y 1500.00
3000 3 Mr. Z 1000.00
3001 3 Mr. Z 1000.00
3002 3 Mr. Z 750.00
What I want to do is to count the pax names per invoice number. Even if the names are the same I want it to be counted.
I have tried a count where the details are
count(tblname.paxname, tblname.invno)
dosen't give me the right count, it's always more
what am I doing wrong???