WITH Featured as ( SELECT p.id FROM POSTS p INNER JOIN Vo...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS Meta

Q&A about the site for administrators, end users, developers and designers for Craft CMS

WITH Featured as (
SELECT p.id
FROM POSTS p 
INNER JOIN Votes V
ON p.Id = v.PostID 
and v.VoteTypeID in (8,9)
GROUP BY p.id
HAVING Count(v.id) % 2 = 0

)
SELECT top 100 f.id [Post Link] , v.* FROM Featured f inner join Votes V
ON f.Id = v.PostID WHERE  v.VoteTypeID in (8,9)

Enter Parameters

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