SELECT content,
REPLACE(
CONCAT(
LEFT(content, LOCATE('<a href=', content)-1),
SUBSTRING(content, LOCATE('>', content)+1)
),
'</a>', ''
) new_content
FROM site_content
SELECT I.NAME_INSTITUTION,
A.UID_FIELD,
A.ANSWER_USER,
COUNT (*) CNT_ANSWER
FROM LIST_INSTITUTIONS I
LEFT JOIN LIST_ANSWERS A ON A.UID_INSTITUTION = I.ID_INSTITUTION
GROUP BY I.NAME_INSTITUTION, A.UID_FIELD, A.ANSWER_USER
HAVING COUNT (*) > 1