I have this query, invinfinfoid as the condition. I want to display the highest itemid or the latest itemid (because it is auto increment) and not display the previous itemid.
SELECT itemid, block_stock, inveninfoid from inventory_movement where inveninfoid IN (71,72,73) order by itemid desc
the result
itemid | block_stock | inveninfoid
2313 | 199 | 71
53 | 200 | 73
52 | 200 | 72
51 | 200 | 71
and this result i want, Eliminate itemid 51
itemid | block_stock | inveninfoid
2313 | 199 | 71
53 | 200 | 73
52 | 200 | 72