Skip to content
Advertisement

Multi-table select, limiting number of results

So let’s say you had a query to retrieve stats on all baseball players in a db that has constantly updating stats such as walks, home runs, etc, such as:

Now say you also wanted to pull stats from another table, say a salaries table, but you wanted to only pull the most recent salary, so something like:

But you only want to get their most recent salary number for each player. How would you combine all of these? Hopefully I explained that clearly.

Advertisement

Answer

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement