Skip to content

Instantly share code, notes, and snippets.

@spencerfinnell
Created July 9, 2018 19:16
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
SELECT COUNT(*) AS `count`, FLOOR(f.facet_value) AS `rating` 
FROM wp_2_facetwp_index f 
WHERE f.facet_name = 'rating'
AND FLOOR(f.facet_value) >= 1 
AND post_id IN (4870,4869,4868,4867,4866....)
GROUP BY rating
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment