Fix sql to retrieve participants