2013-11-07 - delete orphaned entries: update entry set status='d' where entry.status != 'd' and shopkey not in (select key from shop where status != 'd');