To get the number of occurences of each smilie in user's posts on all over the forum, run the sql query:
[SQL]
select smilietext , count(*) as count
from post, smilie
where pagetext like concat("%",smilie.smilietext,"%")
group by smilietext
order by count desc;[/sql]
You will get an output like:
+------------+-------+
| smilietext | count |
+------------+-------+
|

| 14063 |
|

| 4596 |
| :lol: | 2381 |
|

| 1526 |
|

| 1518 |
...
This is useful to determine the popular smilies and to put them in the smiliebox in the message posting interface.