Найти самую активную страну в 2017 году

0

Please login or register to vote for this query.

(click on this box to dismiss)

EOS.IO

Q&A for users and developers of distributed applications built on top of the blockchain operating system, EOS.IO

select top 1 a.location, max(a.count) as 'Кол-во постов'
from (select u.location, count(distinct p.id) as count
      from users u
      join posts p on p.owneruserid = u.id
      where u.location <> ' ' and year(p.creationdate) = 2017
      group by u.location) a
group by a.location, a.count
order by a.count desc

Enter Parameters

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