Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have two tables and I wanna have a list of all orders that contain 2 specific products, in this case I wanna have all orders that bought both a phone (175) and a headset (189). Any ideas how to solve this in a easy way? Thanks
Table Order:
OrderId | Total | Misc |
---|---|---|
1001 | 500 | Misc1 |
1002 | 300 | Misc2 |
Table Product:
OrderId | ProductId | Name | Price |
---|---|---|---|
1001 | 175 | Phone | 400 |
1001 | 189 | Headset | 100 |
1002 | 554 | Charger | 300 |
There were some parenthesis misplaced:
=aggr( Only( {<OrderId = p({<ProductId = {175}>}) * p({<ProductId = {189}>})>} OrderId), OrderId)
Thanks swuehl, It works like a charm.