Uzdevums 1

0

Please login or register to vote for this query.

(click on this box to dismiss)

Gardening and Landscaping

Q&A for gardeners and landscapers

SELECT TOP 10 
  u.Id,
  u.Reputation,
  u.CreationDate,
  u.DisplayName,
  u.LastAccessDate,
  u.WebsiteUrl,
  u.Location,
  u.AboutMe,
  u.Views,
  u.UpVotes,
  u.DownVotes,
  u.ProfileImageUrl,
  u.EmailHash,
  u.AccountId
FROM users u
LEFT JOIN posts p
  ON p.OwnerUserId = u.Id
WHERE u.Location LIKE '%Latvia%'
  AND u.Views > 100
GROUP BY
  u.Id,
  u.Reputation,
  u.CreationDate,
  u.DisplayName,
  u.LastAccessDate,
  u.WebsiteUrl,
  u.Location,
  u.AboutMe,
  u.Views,
  u.UpVotes,
  u.DownVotes,
  u.ProfileImageUrl,
  u.EmailHash,
  u.AccountId
HAVING MAX(p.CreationDate) > '2021-01-01'
ORDER BY u.Views DESC;

Enter Parameters

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