SELECT b.UserId, max(b.Date) DateReceived, u.DisplayName ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT b.UserId, max(b.Date) DateReceived, u.DisplayName
FROM Users u, Badges b
WHERE u.Id=b.UserId
and u.Location like '%Sri Lanka%'
GROUP BY b.UserId, u.DisplayName
HAVING COUNT(*)>2
ORDER BY DateReceived

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results