qtype error in query