AA

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 user1.Id AS User1, user2.Id AS User2
FROM Posts p
INNER JOIN Users user1 ON p.OwnerUserId = user1.Id
INNER JOIN Posts p2 ON p.AcceptedAnswerId = p2.Id
INNER JOIN Users user2 ON p2.OwnerUserId = user2.Id
WHERE user1.CreationDate > GETDATE() - 90
AND user2.CreationDate > GETDATE() - 90
AND p2.DeletionDate IS NULL
AND p2.DeletionDate IS NULL
AND p.AcceptedAnswerId <> p.OwnerUserId 
AND p2.AcceptedAnswerId <> p2.OwnerUserId 
AND p.OwnerUserId IS NOT NULL
AND p2.OwnerUserId IS NOT NULL
AND user1.Id <> user2.Id
GROUP BY user1.Id, user2.Id HAVING COUNT(*) > 1;

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results