Skip to end of banner
Go to start of banner

How to find a Confluence user's favorites list using Sql for Confluence

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Current »

This article explains how to find a Confluence user's favorites list using the SQL for Confluence app.

Instructions

  1. In a Confluence page, search for the SQL Query macro or enter {sql and select the macro.
  2. Enter the following query in the macro and select Output format as Wiki:

    SELECT u.username, c.title FROM label l, content_label t, content c, user_mapping u WHERE l.labelid=t.labelid AND t.contentid=c.contentid AND t.owner = u.user_key;

The query retrieves information about all users with the list of their respective favorite pages. The output of the above query is as follows:

The query used in this example was written for PostgreSQL database. You may need to modify the query depending on the database used in your organization.
  • No labels