I want to select only the id which has the maximum precedence with the following table (table1) whose item_id is 1001.
table1
id | plan_id | item_id | plan_item_bundle_id | precedence
-----+---------+---------+---------------------+------------
401 | | 1001 | | -1
402 | | 1001 | | -1
How can I do it ? Thanks
I dont care if the precedence is same, any one would do.
Thanks
Try this query