/* select top 20 * from users u left join posts p on u.id...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Moderators

Q&A for community managers, administrators, and moderators

-- таблица с сопоставление пользователей и их заросов
/*
select top 20 * 
  from users u
  left join posts p on u.id = p.owneruserid
*/
-- найдем пользователя, не написавшего ни одного вопроса

select * 
  from users 
  where id not in (
    select owneruserid 
      from posts
      where owneruserid is not null
  )

Enter Parameters

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