How can I find all Hashtags ever used in Channel?

The query shows the hashtags for all users but was limited to a specific channel.
There’s no regexp_matches for MySQL as far as I can see, at least I haven’t found an easy way to port it, but this linux command should be good enough and it also sorts the hashtags by number of occurences.

# echo "SELECT Message FROM Posts;" | mysql -N mm720 | grep -Po '\K#[^[:space:]#]+' | sort | uniq -c
      2 #hash2
      1 #hash3
      1 #hash4
      1 #hashtag
      1 #hashtag1

This command will search for hashtags in all posts in all channels on the local mysql server which you can connect to using no password to the database mm720.
If you require a specific username and password, you will have to add the -u and -p parameters to the mysql command accordingly. Let me know what your setup looks like if you need help with that.