Select * FROM USERS u INNER JOIN ( SELECT USERID,COUNT(*)...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Vi and Vim

Q&A for people using the vi and Vim families of text editors

Select * 
FROM USERS u
  INNER JOIN
  (
  SELECT USERID,COUNT(*) CountEnlightened
  FROM BADGES
  WHERE Name = 'Enlightened'
  GROUP BY USERID
  )b
  on b.UserId = u.id
WHERE REPUTATION
  IN (SELECT MAX(REPUTATION) FROM USERS)

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results