Prueba 1

0

Please login or register to vote for this query.

(click on this box to dismiss)

Drupal Answers

Q&A for Drupal developers and administrators

SELECT t.TagName, count(p.id) as cant_preguntas
FROM Tags t
JOIN PostTags pt on t.id = pt.TagId
JOIN Posts p on p.id = pt.PostId
JOIN Users u on p.OwnerUserId = u.id -- si el id es el mismo el nombre de usuario tambien ya que id es unico
JOIN Badges b on u.id = b.UserId
WHERE u.id = 5788 --no tengno que chequear por nombre de usuario
AND p.tags IS NULL
AND YEAR(b.date) > 2022
GROUP BY t.TagName
ORDER BY cant_preguntas DESC

Enter Parameters

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