Label database query tool