SELECT * FROM Users INNER JOIN Posts on Users.Id = Posts....

0

Please login or register to vote for this query.

(click on this box to dismiss)

Joomla Meta

Q&A about the site for Joomla! administrators, users, developers and designers

SELECT 
*
FROM
  Users
INNER JOIN
  Posts
on
  Users.Id = Posts.OwnerUserId
inner join
(
  SELECT
      --ROW_NUMBER() OVER(ORDER BY Reputation DESC) AS [#], 
      Users.Id as user_id,
      COUNT(Users.Id) as "Num Respostas",
      MAX(Posts.Score) as Pontos
      --Reputation
  FROM
      Users INNER JOIN Posts
  ON
      Users.Id = Posts.OwnerUserId
  WHERE
      LOWER(AboutMe) LIKE LOWER('%Jupyter%')
      AND
      Posts.PostTypeId = 2
  GROUP BY
      Posts.PostTypeId, Users.Id
) gg
ON
    Users.Id = gg.user_id
    and
    Posts.Score = gg.Pontos
where 
    Posts.PostTypeId = 2
ORDER BY
    gg.Pontos DESC

Enter Parameters

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