Repeat region help with filtering

Im a little stuck here, any help would be great

I have three database tables
ProductsTable > Fields (product_id, product_description)
GroupsTable > Fields (group_id, group_name)
PriceTable > Fields (price_id, group_id_fk, product_id_fk, price)

The reason behind this is my site sells a single set of products, but the price of each product is different according the group I will be selling to.

Typical data placed in these tables would be




What I am trying to do is make a list, filtered by Group, where it only returns all available products that have not had a price set already.

So if I chose from a select dropdown, “Shops” it should return nothing because all pricing for Shops has already been set.
If I choose Malls, it should only show me Apples and Grapes because I only have a price set for Oranges.
If I choose EndUser, it should only show me Oranges because it is the only product left without price.

I hope this makes sense. It seemed so simple to me until i actually tried to do it. Just can not get the correct result returned.

Community Page
Last updated: