Jump to content

how to create ranking and order mysql table


alapimba

Recommended Posts

Hello

 

I have a mysql table like this:

id | user | car
1 | 1 | fiat 500
2 | 2 | vw polo
3 | 2 | vw golf
4 | 3 | renault clio
5 | 2 | fiat panda

6 | 3 | seat ibiza

From this table how can i get a query that the result be like:

 

user 2 - 3 cars

user 3 - 2 cars

user 1 - 1 cars

 

Thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.