Here is an image of my current code
This is what my current code outputs when I enter it
This is what I need my code to be outputting
2
Seems like you just want the top record. For starter, You can append LIMIT 1 at the end of the query. It should give you the top record.
LIMIT 1
You can also use aggregation function MAX() for the quantity field to only choose the maximum one.
If your select statement is working properly, I think you just need to add "limit 1" at the end of your statment.
Click here to cancel reply.
2
Answers
Seems like you just want the top record.
For starter, You can append
LIMIT 1
at the end of the query. It should give you the top record.You can also use aggregation function MAX() for the quantity field to only choose the maximum one.
If your select statement is working properly, I think you just need to add "limit 1" at the end of your statment.