SQL query filter help needed
I'm having this tables for products, products orders and products accesses (downloads) and I want to build a filter query. Everything works fine for the products table but when the query gets a little more complicated and, for example, I want to select only the products that have more than 1 orders or more than 1 accesses nothing happens....the filter doesn't work. I'll just paste the query here...hope there is someone to light this up a little for me.
COUNT( products_accesses.ID ) AS accesses,
COUNT( products_orders.ID ) AS orders,
products . *
products_accesses ON ( products.ID = products_accesses.prod_id )
products_orders ON ( products.ID = products_orders.prod_id )
COUNT( products_accesses.ID )
products ON ( products.ID = products_accesses.prod_id )
) > '1'
COUNT( products_orders.ID )
products ON ( products.ID = products_orders.prod_id )
) > '1'
There's no error or anything like that...just an invalid filter.