Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New Coder
    Join Date
    May 2012
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts

    mysql quesry top 3 times.

    I have a table that has 3 fields (mapname, profile, time).


    Code:
    Map_1	steam1	10.00
    Map_1	steam2	20.00
    Map_1	steam3	30.00
    Map_1	steam4	40.00
    Map_1	steam5	50.00
    
    Map_2	steam1	04.00
    Map_2	steam2	14.00
    Map_2	steam3	25.00
    Map_2	steam4	26.00
    
    Map_3	steam1	12.00
    Map_3	steam2	41.00
    Map_3	steam3	20.00
    Map_3	steam4	22.00
    Map_3	steam5	10.00
    Map_3	steam6	14.00
    result(Top 3 times each map give profile one point):

    Profile - Points

    steam1 - 3
    steam2 - 2
    steam3 - 2
    steam4 - 0
    steam5 - 1
    steam6 - 1

    or result2

    Map_1 steam1 10.00
    Map_1 steam2 20.00
    Map_1 steam3 30.00

    Map_2 steam1 04.00
    Map_2 steam2 14.00
    Map_2 steam3 25.00

    Map_3 steam1 12.00
    Map_3 steam5 10.00
    Map_3 steam6 14.00

    SELECT 3xmin(time) FROM table......something like this???
    Last edited by Radeom; 10-31-2013 at 09:46 PM.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •