I am stuck with a problem who's solution can easily be solved by using Sub Query but it's taking too long so I'm looking for an alternate option.
Here are two tables
user
- id
- fName
- lName
transaction
- id
- user_id FK to user.id
- amount
Now, a user can have multiple transactions. If I want to get the fName, lName and the latest transaction id, latest transaction amount of the user, is it possible to do it in a single query without using sub query?