Answers.Body: <p>You could do it like this:</p>
  
  <p><code>{% set categories = craft.categories.relatedTo({
      sourceElement: craft.entries.limit(null)
  }) %}
  </code></p>
  
  <p>reference: <a href="https://craftcms.slack.com/archives/help/p1429030702000608" rel="nofollow">https://craftcms.slack.com/archives/help/p1429030702000608</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-14T17:40:08.430Z
Answers.Text: Is there a slack group? And if so, how would one get access to it?
Answers.UserDisplayName: Douglas McDonald
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-15T09:41:24.510Z
Answers.Text: @Douglas http://buildwithcraft.com/community
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-15T16:08:28.110Z
Answers.Text: @carlcs don't know how i missed that. Thanks.
Answers.UserDisplayName: Douglas McDonald
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-14T17:03:46.807Z
Answers.LastActivityDate: 2015-04-14T17:03:46.807Z
Answers.UserDisplayName: Luke Holder
Body: <p>I want all categories that have at least one entry that uses it.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-14T20:44:09.570Z
Comments.Text: Luke, this is an exact duplicate of Russ's question. Feel free to provide an answer over on that thread. :)
Comments.UserDisplayName: Lindsey D
Tags: <categories><relations>
Title: How do I get all categories with at least one entry
ThreadText: # How do I get all categories with at least one entry
  
  (Asked by: username_0 on 2015-04-14)
  
  I want all categories that have at least one entry that uses it.
  
  **Tags:** categories, relations
  
  > **Comments:**
  > **username_1**: username_0, this is an exact duplicate of Russ's question. Feel free to provide an answer over on that thread. :)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2015-04-14. Score: 1
  
  You could do it like this:
  
  `{% set categories = craft.categories.relatedTo({
  sourceElement: craft.entries.limit(null)
  }) %}`
  
  reference: <https://craftcms.slack.com/archives/help/p1429030702000608>
  
  > **Comments:**
  > **username_2**: Is there a slack group? And if so, how would one get access to it?  
  > **username_3**: @username_2 http://buildwithcraft.com/community  
  > **username_2**: @username_3 don't know how i missed that. Thanks.  
  
  ---
  
  