I have this query:
select count(*)
from seller s
left join product pr on s.id = pr.seller_id
left join special_price_discount spd on pr.id = spd.product_id
left join product___tag pt on pr.id = pt.product_id
left join tag t on pt.tag_id = t.id
left join product___size ps on ps.product_id = pr.id
In db I have two products, how I get right count result, because now I get 19 instead of 2.
I tried add 'group by pr.id', but then query returns 2 results, with 'distinct' I also have 19. Or there are too many joins and I cannot gain appropriate result? Any ideas?