USE provisioning;

DELETE FROM xmlhostgroups
  WHERE group_id IN (SELECT id FROM xmlgroups WHERE name = 'pbx')
  AND host_id IN (SELECT id FROM xmlhosts WHERE description = 'Sems-PBX');

DELETE FROM xmlhosts WHERE description = 'Sems-PBX';
DELETE FROM xmlgroups WHERE name = 'pbx';
