I'm getting an error that says there isn't a unique table/alias for 'brand' but I set brand as b.name in my SELECT clause so I don't understand why I'm getting this issue.
SELECT p.productname as product, b.name as brand
from product p, brand b, foodtype f
inner join brand
on p.brand_id = b.id
inner join foodtype
on p.foodtype_id = f.id
inner join brand
on p.petcat_id = 2
inner join brand
on p.productcat_id = pr.id
order by p.brand_id, p.product_name;
Alias error