V
V
Vladimir Shiklgruber2015-07-09 01:18:11
PHP
Vladimir Shiklgruber, 2015-07-09 01:18:11

How to select the three entries with the highest number?

Hello. There is a task like this
in the allianc table there is a dip field
there is a reqest table it has three fields uid and id time (int)
You must select from the reqest table the n-th number of records with the highest time
n-th number === the number from the dip field.
How to elegantly solve this problem?
thanks in advance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2015-07-09
@aaadddminnn

dig there - left join, max(time) as res, where res = dip. I think the meaning is clear.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question