Firstly, nothing in your post matches up or accurately defines what result you are trying to get and why. That query cannot be producing the OUTPUT you show, because you are searching for emi_flag.booking_id1=104. There cannot be booking_id1 values of 22 and 23 in the result. There’s also no way that the emi_id values in the desired output can be 1 and 2 for booking_id1 values of 23 and 22 respectively (I can believe they should be 2 and 4, based on what I think you are trying to accomplish.)
Don’t use SELECT *, You need to select just the columns that you want. This is additionally important in JOINed queries, since it helps to document what you are trying to do, i.e. which columns you are selecting from which table.
Don’t have column(s) ending in numbers. If you have a sequence of such columns, i.e. booking_id1, 2, 3, … that indicates a bad database design. The booking_id1 column should just be named booking_id.
You should use table aliases in your query to cut down on the clutter and typing you have to do.
You should store dates in a DATE data type column, in which case they will have the format - YYYY-MM-DD.
Lastly, since you didn’t accurately state/show what result you want and why, I’ll take a guess that you want the last row (highest emi_id value) within each group of booking_id values? If this is correct, see this link - https://dev.mysql.com/doc/refman/8.0/en/example-maximum-column-group-row.html