Mysql – Query that sets a flag based on a condition for a group of left joined records
I have 2 tables, 'manufacturers' and 'products'. A manufacturer can have multiple products and a product has a 'qty', 'price' and 'cost' field. I've LEFT JOINed them together and can get SUMs on the 'price' and 'cost' fields based on…