SQL: The most N used words per user (speak their language!)

To answer myself, this seems to work decently:

SELECT word, count(*)
FROM ( 
  SELECT regexp_split_to_table(raw, ' ') as word
  FROM posts
  order by id desc
  limit 100000
) t
GROUP BY word
order by count(*) desc
2 Likes