Define beans for queries