I have following table structure:
uid | product_code
---------------------
00001 | 'tb'
00001 | 'im'
00001 | 'ip'
00002 | 'tb'
00002 | 'im'
I want a selfjoin query that will show me those uids which have all three product codes ‘mg’,’ip’,’tb’ with them. i.e only 00001 will be displayed. How can it be done?
should work also if you have more product codes.