diff options
author | Tom Willemse | 2013-10-06 15:06:19 +0200 |
---|---|---|
committer | Tom Willemse | 2013-10-06 15:06:19 +0200 |
commit | 209281dcd98231be16b8c67d05597758ae64f43b (patch) | |
tree | 9a843088d04f9ab7f7047da5b174ce11302b1a34 /lisp/queries.lisp | |
parent | acc01decbee8479390cef7d0693c1596afc65b02 (diff) | |
download | clark-master.tar.gz clark-master.zip |
Diffstat (limited to 'lisp/queries.lisp')
-rw-r--r-- | lisp/queries.lisp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/queries.lisp b/lisp/queries.lisp index 0ffb302..a7bdc69 100644 --- a/lisp/queries.lisp +++ b/lisp/queries.lisp @@ -141,3 +141,12 @@ (execute-to-list *db* (sql select "url" from "bookmark")))) + +(defun tag-list () + "Get a list of all tags stored." + (execute-to-list + *db* (sql select "name, COUNT(bookmark_id)" + from "tag" + join "bookmark_tag" on ("tag_id = tag.ROWID") + group by "tag.ROWID" + order by "COUNT(bookmark_id)" desc))) |