Hello SQL

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

SELECT u.Id, u.DisplayName, u.Views, b.Name, b.Class
FROM Users u
JOIN Badges b ON u.Id = b.UserId
WHERE YEAR(u.CreationDate) = 2023
AND u.Views = (
    SELECT MAX(Views)
    FROM Users
    WHERE YEAR(CreationDate) = 2023
)

SELECT b.Name
FROM Badges b
WHERE b.UserId = '22442059';

Enter Parameters

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