SELECT wpzc_posts.ID
FROM wpzc_posts
LEFT JOIN wpzc_term_relationships
ON (wpzc_posts.ID = wpzc_term_relationships.object_id)
INNER JOIN wpzc_postmeta
ON ( wpzc_posts.ID = wpzc_postmeta.post_id )
WHERE 1=1
AND wpzc_posts.ID NOT IN (8190)
AND ( wpzc_term_relationships.term_taxonomy_id IN (31,374,618,910,1059) )
AND ( wpzc_postmeta.meta_key = 'views' )
AND wpzc_posts.post_type = 'post'
AND ((wpzc_posts.post_status = 'publish'))
GROUP BY wpzc_posts.ID
ORDER BY wpzc_postmeta.meta_value+0 DESC
LIMIT 0, 5
SELECT wpzc_posts.ID
FROM wpzc_posts
INNER JOIN wpzc_postmeta
ON ( wpzc_posts.ID = wpzc_postmeta.post_id )
WHERE 1=1
AND wpzc_posts.ID NOT IN (8676,8712,8743,9953,11752,17894,18990)
AND ( wpzc_posts.ID NOT IN (
SELECT object_id
FROM wpzc_term_relationships
WHERE term_taxonomy_id IN (31,374,618,910,1059) ) )
AND ( wpzc_postmeta.meta_key = 'views' )
AND wpzc_posts.post_type = 'post'
AND ((wpzc_posts.post_status = 'publish'))
GROUP BY wpzc_posts.ID
ORDER BY wpzc_postmeta.meta_value+0 DESC
LIMIT 0, 5