Email Record: Repairing and querying databases under aggregate constraints /