Question 1


Please login or register to vote for this query.

(click on this box to dismiss)

The following query displays select fields from the Users table. Modify the query to display the users ordered by decreasing reputation.


Q&A for Joomla! administrators, users, developers and designers

SELECT u.DisplayName, u.Id, u.Location, u.Reputation , b.BadgeCount
FROM Users u
left join 
(SELECT userid, count(distinct id) as BadgeCount
FROM badges
where year(date) = 2016 and month(date) = 1
group by userid) b
on = b.userid
order by b.BadgeCount desc

Enter Parameters

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