WITH t1 AS ( SELECT u.Id AS user_id, COUNT(p.Id) AS numbe...

0

Please login or register to vote for this query.

(click on this box to dismiss)

English Language Learners Meta

Q&A about the site for speakers of other languages learning English

WITH t1 AS (
  SELECT u.Id AS user_id, COUNT(p.Id) AS number_of_posts_per_user
  FROM Users u
  LEFT JOIN Posts p
    ON u.Id = p.OwnerUserId
  GROUP BY u.Id 
  )
SELECT COUNT(1)
FROM t1;

Enter Parameters

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