Lovely Professionals

0

Please login or register to vote for this query.

(click on this box to dismiss)

CiviCRM

Q&A for administrators and users of the CiviCRM Constituent Relationship Management software

SELECT 
  u.Id AS [User Link],
  x.postCount,
  u.*
FROM (
  SELECT 
    u.Id,
    COUNT(p.Id) AS postCount
  FROM Users u
    JOIN Posts AS p ON p.OwnerUserId = u.Id
  WHERE 
    u.Location LIKE '%lovely professional%'
  GROUP BY u.Id
) AS x
  JOIN Users as u ON u.Id = x.Id

Enter Parameters

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