Forum Moderators: open
what is the best way to do so?
at the moment I am doing
SELECT * FROM (
SELECT COUNT(DISTINCT widget_attribute_id) AS widget_attribute_count FROM widgets WHERE (widget_attribute_id = 1 OR widget_attribute_id = 2))
AS matching_attributes WHERE widget_attribute_id > 1