SELECT TOP 1 Names , NumberOfBadges, Location, Badge, Yea...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Cardano

Q&A for users and developers of the Cardano cryptocurrency ecosystem

SELECT TOP 1 Names , NumberOfBadges, Location, Badge, Year
from (
         SELECT YEAR(Badges.Date)  AS Year,
                Users.DisplayName  AS Names,
                (Count(Badges.ID)) AS NumberOfBadges,
                Users.Location     AS Location,
                Badges.Name        AS Badge
         FROM Users,
              Badges
         WHERE Users.Id = Badges.UserId
           AND Users.Location = 'South Africa'
           AND Badges.Name = 'Enlightened'
           AND YEAR(Badges.Date) = 2016
         GROUP BY Users.DisplayName, Users.Location, Badges.Name,YEAR(Badges.Date)
     ) as ResultsfromJoinedTables
order by 2 desc;

Enter Parameters

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