Using mysql 5.5 but don't think that matters...
I have 3 tables
some accounts have multiple products associated with them, some don't have any.
I need a query to return all accounts with associated products
a_id|StoreName | UPC | ProdName
1234 | Bob's Mart |12345 | WidgetA |
1235 | Bob's Mart |22345 | WidgetB |
1256 | Smart Mart |12345 | WidgetA |
3321 | Kwik Mart | null | null
I've tried a few combinations of left & right joins but can't seem to get it right.
I'm doing this in coldfusion so I can nest the product query within a store loop but Is this do-able with joins (or unions)??