Skip to content
Advertisement

Counting How ID has Same Join Combination?

I has Join table, and result is like this

i’m confused how to count the IDA who has same Condition of IDB and QTY together.

So what i want is:

So basically i want count of IDA who has same IDB and QTY Combination. What Query should i do? i still don’t get how making query for this logic, thank you.

Edit :

What i want is the result in one query, i will not making manually Where condition of IDB-QTY Combination. (so basically the result is not from Where condition)

Advertisement

Answer

You can use aggregating with using group_concat() function

Demo

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement