Abort model's query only if all conditions have no rows in source model

Will, 
What do you want to happen? Do you want the table to show as blank? Do you want anything else to show instead? You could add rendering conditions on the table to hide it if both the oppcontact model and the account model don’t have data rows. That may not be ideal depending on your use case, but at least your users wouldn’t see a table of random opportunities. Another option would be to have two opportunity models on the page and two tables, one for each condition. You could render the proper one based on which model has data rows