SELECT u.Id AS [User Link], CONCAT('https://stackoverflow...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Raspberry Pi Meta

Q&A about the site for users and developers of hardware and software for Raspberry Pi

SELECT u.Id AS [User Link],
                            CONCAT('https://stackoverflow.com/users/', u.Id) AS [Profile Link],
                            u.DisplayName,
                            u.Location,
                            u.WebsiteUrl,
                            u.AboutMe,
                            u.Views,
                            u.UpVotes,
                            u.DownVotes,
                            bounties.BountiesWon
             FROM Users u
        
             JOIN (
                    SELECT DISTINCT UserId
                    FROM Badges
                    WHERE LOWER(Name) IN ('java') AND
                          Class IN (2) AND
                          TagBased = 1
                  ) tag_badges
             ON tag_badges.UserId = u.Id
             
             LEFT JOIN 
             (
               SELECT Posts.OwnerUserId, COUNT(*) As BountiesWon
               FROM Votes
               JOIN Posts ON Votes.PostId = Posts.Id
               JOIN VoteTypes ON VoteTypes.Id = Votes.VoteTypeId
               WHERE VoteTypes.Name = 'BountyClose'
               GROUP BY Posts.OwnerUserId
             ) bounties
             ON bounties.OwnerUserId = u.Id
             
             WHERE LOWER(Location) LIKE '%gurgaon%'

Enter Parameters

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