Ontology-mediated query answering is an extensively studied paradigm, which aims at improving
query answers with the use of a logical theory. In this paper, we focus on ontology languages based on
existential rules, and we carry out a thorough complexity analysis of the problem of explaining query
answers in terms of minimal subsets of database facts and related task