Horn clauses and the fixpoint query hierarchy