I am having a problem with a MySQL query.
Let's say we have two tables:
id qty
eleven
2 ...... 1
3 ...... 1
4 ...... 3
and
id qty
12
2 ...... 1
6 ...... 1
7 ...... 2
What I really need to get is a result filtered by id, so there are no duplicate identifiers. If they are two identical identifiers, only the identifier with a higher qty number will be taken into account. Therefore, in an ideal situation, I get this result:
id qty
12
2 ...... 1
3 ...... 1
4 ...... 3
6 ...... 1
7 ...... 2
SOION SELECT, , , , . GROUP BY . PHP, , MySQL.
, !