SQL: get candidacy application