Skip to content
Advertisement

Return multiple records, but it should limit 1 record per each similar condition

Expected results:

Explanation: In the results, James is representing all people aged 20. And Blue is representing all people aged 15. And so on..

Question: How can this query type of query be achieved? Thank you.

Advertisement

Answer

If you want one name per age, you can use:

If you want the first row, then:

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