Get list of topics pinned globally

Here is an updated Data Explorer query which returns a tidier list of all pinned posts by category, with globally pinned topics at the top:

SELECT pinned_globally, TO_CHAR(pinned_until,'DD/MM/YYYY') as pinned_till, id as topic_id, user_id, category_id 
FROM topics 
WHERE deleted_at IS NULL
AND pinned_at IS NOT NULL
AND (pinned_until IS NULL OR pinned_until > CURRENT_TIMESTAMP)
ORDER BY pinned_globally desc, category_id