I have 2 tables in our MySQL database like this: TABLE: customers +------------------+-----------------------+------+-----+---------+----- -----------+ | Field | Type | Null | Key | Default | Extra | +------------------+-----------------------+------+-----+---------+----- -----------+ | custid | mediumint(8) unsigned | | PRI | NULL | auto_increment | | name | tinytext | YES | | NULL | | | email | tinytext | YES | | NULL | | | company | tinytext | YES | | NULL | | +------------------+-----------------------+------+-----+---------+----- -----------+
TABLE: shipment +---------------------+-----------------------+------+-----+---------+-- --------------+ | Field | Type | Null | Key | Default | Extra | +---------------------+-----------------------+------+-----+---------+-- --------------+ | shipmentid | mediumint(10) | | PRI | NULL | auto_increment | | origin | mediumint(10) | YES | | NULL | | | destination | mediumint(10) | YES | | NULL | | | quoteid | mediumint(10) | YES | | NULL | | | customerid | mediumint(10) | YES | | NULL | | | carrierid | mediumint(10) | YES | | NULL | | +---------------------+-----------------------+------+-----+---------+-- --------------+ I need to construct a query to find out what customers in the database have not booked shipments with us. That means there would be no records in the shipment table for a given customer id. I can easily get a count of how many shipments are there for customers that have booked (via count() and group), but this one is eluding me.. Any help or suggestions on where to get more info would be appreciated. Thanks, Darren Young The Freight Depot --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php