I have a table with values and date associated with the user and track/units he has invested in. Something like below:

```
id , track_id , user_id , value  , created_at          , updated_at,
 1 ,        7 ,       7 , 310.00 , 2014-07-11 11:55:20 , 0000-00-00 00:00:00,
 2 ,        2 ,       3 , 400.00 , 2014-07-10 00:00:00 , 0000-00-00 00:00:00,
 3 ,        2 ,       3 , 300.00 , 2014-07-11 00:00:00 , 0000-00-00 00:00:00,
 4 ,        4 ,       7 , 500.00 , 2014-07-11 09:23:17 , 0000-00-00 00:00:00,

```

I want a query to fetch my result something like

user\_id, gain(%)

So basically the query would fetch top N say 3 gainers over last 7 days. My Database in MySql