SELECT U.Id, COUNT(*) AS numBadges FROM (Users as U INNER...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Monero Meta

Q&A about the site for developers and users of the secure, private and untraceable cryptocurrency Monero

SELECT
  U.Id,
  COUNT(*) AS numBadges
FROM (Users as U INNER JOIN Badges AS B ON B.UserId = U.Id)
GROUP BY U.Id
ORDER BY numBadges

SELECT
  Id,
  (SELECT COUNT(*)
   FROM Badges 
   WHERE Badges.UserId = Users.Id 
  ) AS numBadges
FROM Users
WHERE Reputation = 99
ORDER BY numBadges;


SELECT Id, 
   Name, 
   (SELECT COUNT(*)
   FROM Posts AS P
   WHERE P.PostTypeId = Pt.Id) AS NumOfRows ,
   (SELECT MIN(CreationDate)
   FROM Posts AS P1
   WHERE P1.PostTypeId = Pt.Id) AS MinDate
FROM PostTypes AS Pt

Enter Parameters

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