thefrstgatsby
Technical User
I am retrieving info from a table, and this is the problem
assume I want to retrieve the top 50 people, based on how much money they have, and I want to list the cars they drive.
if I just select, amount of money, name and car, and order by money, I get this.
200$ mike ferrari
200$ mike lamborghini
5$ matt pinto
5$ matt sunfire
5$ matt chevy
but that's not really the top 50 by money, because they are duplicated.
So I want the list to come out like this
200$ mike ferrari, lamborghini
5$ matt pinto, sunfire, chevy
now it's a top 50 (or 2) because it only lists the people and their money once.
What do I need to do to get these results?
assume I want to retrieve the top 50 people, based on how much money they have, and I want to list the cars they drive.
if I just select, amount of money, name and car, and order by money, I get this.
200$ mike ferrari
200$ mike lamborghini
5$ matt pinto
5$ matt sunfire
5$ matt chevy
but that's not really the top 50 by money, because they are duplicated.
So I want the list to come out like this
200$ mike ferrari, lamborghini
5$ matt pinto, sunfire, chevy
now it's a top 50 (or 2) because it only lists the people and their money once.
What do I need to do to get these results?