UPDATE echo_drafts
SET draft_text=REPLACE(REPLACE(draft_text,'— ÉCHO 👻','👻 ÉCHO 👻'),'— ÉCHO','👻 ÉCHO 👻')
WHERE draft_text LIKE '%— ÉCHO%';

UPDATE echo_drafts
SET share_score=LEAST(96,
  58
  + CASE format_slug WHEN 'meme' THEN 9 WHEN 'video' THEN 8 WHEN 'bd' THEN 8 WHEN 'carrousel' THEN 7 WHEN 'story' THEN 6 ELSE 5 END
  + CASE WHEN CHAR_LENGTH(hook_text) BETWEEN 35 AND 125 THEN 8 WHEN CHAR_LENGTH(hook_text)<=170 THEN 4 ELSE 0 END
  + CASE WHEN hook_text LIKE '%?%' THEN 4 ELSE 0 END
  + MOD(CRC32(LOWER(hook_text)),9)
)
WHERE share_score BETWEEN 80 AND 84;
