SELECT * FROM Badges WHERE Name = 'Enlightened' AND (dat...

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

-- [Enter Query Title]
--select count(id) from posts;

SELECT * FROM Badges 
WHERE Name = 'Enlightened' AND (date >'2015-12-31 00:00:00' AND date < '2017-01-01 00:00:00');

select Date from Badges;




--SELECT COUNT(Users.Id) FROM Users
--INNER JOIN Badges ON Users.Id = Badges.Id;

--SELECT 

--SELECT * From Users where Reputation = '1194368'

--SELECT MAX(Reputation), DisplayName AS Reputation FROM Users;

--What is the name of the most reputable "South Africa" user and
--how many "Enlightened" badges did they receive in 2016?

SELECT top 5 Users.DisplayName, Users.Location
FROM Users
INNER JOIN Badges ON Users.Id = Badges.Id
WHERE Location LIKE '%South Africa' AND Name = 'Enlightened' 
AND (date >'2015-12-31 00:00:00' AND date < '2017-01-01 00:00:00')
ORDER BY Reputation DESC;

Enter Parameters

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