I want to display all Items and list of Customer Names that bought and does not bought such item. Columns to display Item, Item Name, Customers Names that bought, Customers Names that does not bought. In SQL it looks like this. SELECT field1,field2,field3 FROM tbl1 JOIN tbl2 on ... WHERE field3 NOT IN ( SELECT distinct field3 FROM tbl3 JOIN tbl4 on ... WHERE ...) here 4 tables customers orders orderlines items custid|name| orderid|custid| orderid|itemid| itemid|name Continue reading...