Answers.Body: <p>Reports for Contributions have grouping and quite a few in the 'Extended Reports' extension (which I guess most would use) as well. The 'Report Plus' extension has grouping also. So CiviCRM certainly has the concept of grouping.  In addition the new 'Search Kit' can do grouping - and many other things, it's a really significant addition to CiviCRM.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-13T03:04:13.470Z
Answers.Text: The question mentions CiviReport, but I think Search Kit would be the best way to get a list of countries represented at an event.
Answers.UserDisplayName: Noah Miller
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-07T18:47:47.783Z
Answers.LastActivityDate: 2021-10-07T18:47:47.783Z
Answers.UserDisplayName: Andy Clark
Answers.Body: <p>You can build that with <a href="https://docs.civicrm.org/user/en/latest/the-user-interface/search-kit/" rel="nofollow noreferrer">Search Kit</a></p>
  <p><a href="https://dmaster.demo.civicrm.org/civicrm/admin/search#/create/Participant?params=%7B%22version%22:4,%22select%22:%5B%22Participant_Contact_contact_id_01_Contact_Address_contact_id_01.country_id:label%22,%22COUNT(id)%20AS%20COUNT_id%22%5D,%22orderBy%22:%7B%7D,%22where%22:%5B%5B%22event_id%22,%22%3D%22,%221%22%5D%5D,%22groupBy%22:%5B%22Participant_Contact_contact_id_01_Contact_Address_contact_id_01.country_id%22%5D,%22join%22:%5B%5B%22Contact%20AS%20Participant_Contact_contact_id_01%22,%22INNER%22,%5B%22contact_id%22,%22%3D%22,%22Participant_Contact_contact_id_01.id%22%5D%5D,%5B%22Address%20AS%20Participant_Contact_contact_id_01_Contact_Address_contact_id_01%22,%22LEFT%22,%5B%22Participant_Contact_contact_id_01.id%22,%22%3D%22,%22Participant_Contact_contact_id_01_Contact_Address_contact_id_01.contact_id%22%5D,%5B%22Participant_Contact_contact_id_01_Contact_Address_contact_id_01.is_primary%22,%22%3D%22,true%5D%5D%5D,%22having%22:%5B%5D%7D" rel="nofollow noreferrer">Try this</a> on dmaster.demo.civicrm.org</p>
  <p><a href="https://i.sstatic.net/gcIvm.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/gcIvm.png" alt="enter image description here" /></a>
  <a href="https://i.sstatic.net/Ixsos.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Ixsos.png" alt="enter image description here" /></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-14T18:44:43.250Z
Answers.Text: i think it is great that you are offering these examples so thought adding the screenshot would help protect the example beyond the next 'flush' (or am i wrong? will they stick around?)
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-14T20:05:01.207Z
Answers.Text: Good idea to include the screenshot, but actually it's all in the (very long!) URL so won't be flushed.
Answers.UserDisplayName: Aidan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-15T01:12:42.217Z
Answers.Text: ah. right. nice
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-14T18:39:01.250Z
Answers.LastActivityDate: 2021-10-14T20:09:27.453Z
Answers.LastEditDate: 2021-10-14T20:09:27.453Z
Answers.UserDisplayName: Aidan
Answers.Body: <p>The &quot;group by&quot; in your question is presumably <a href="https://en.wikipedia.org/wiki/Group_by_(SQL)" rel="nofollow noreferrer">the sql construct</a>. CiviReport makes heavy use of sql to build it's results and has a 'group by' concept that is essentially an abstraction of that sql concept, though somewhat more flexible.</p>
  <p>But of course, it's always more complicated than you think, so the &quot;group by&quot; thing in CiviReport isn't always available, it's only there when it's been setup by whoever writes the civireport &quot;template&quot;.</p>
  <p>If you are working with a report that doesn't have group by option already visible to you in the UI, it's probably not hard to add it. Look in the developer tab to provide the specific/template you're using for your report and you can probably get some more specific help.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-12T17:38:41.267Z
Answers.LastActivityDate: 2021-10-12T17:38:41.267Z
Answers.UserDisplayName: Alan Dixon
Body: <p>My org wants to know which countries were represented at an event. A simple way to do this is to &quot;group by&quot; country. Does CiviReport have a concept of grouping by a column?</p>
  
Tags: <civireport><groups><reports><custom-reports><searchkit>
Title: Does CiviReport have a concept of "Group By"?
ThreadText: # Does CiviReport have a concept of "Group By"?
  
  (Asked by: username_0 on 2021-10-07)
  
  My org wants to know which countries were represented at an event. A simple way to do this is to "group by" country. Does CiviReport have a concept of grouping by a column?
  
  **Tags:** civireport, groups, reports, custom-reports, searchkit
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2021-10-07. Score: 5
  
  Reports for Contributions have grouping and quite a few in the 'Extended Reports' extension (which I guess most would use) as well. The 'Report Plus' extension has grouping also. So CiviCRM certainly has the concept of grouping. In addition the new 'Search Kit' can do grouping - and many other things, it's a really significant addition to CiviCRM.
  
  > **Comments:**
  > **username_2**: The question mentions CiviReport, but I think Search Kit would be the best way to get a list of countries represented at an event.  
  
  ---
  
  ### Answer by username_3 on 2021-10-14. Score: 3
  
  You can build that with [Search Kit](https://docs.civicrm.org/user/en/latest/the-user-interface/search-kit/)
  
  [Try this](https://dmaster.demo.civicrm.org/civicrm/admin/search#/create/Participant?params=%7B%22version%22:4,%22select%22:%5B%22Participant_Contact_contact_id_01_Contact_Address_contact_id_01.country_id:label%22,%22COUNT(id)%20AS%20COUNT_id%22%5D,%22orderBy%22:%7B%7D,%22where%22:%5B%5B%22event_id%22,%22%3D%22,%221%22%5D%5D,%22groupBy%22:%5B%22Participant_Contact_contact_id_01_Contact_Address_contact_id_01.country_id%22%5D,%22join%22:%5B%5B%22Contact%20AS%20Participant_Contact_contact_id_01%22,%22INNER%22,%5B%22contact_id%22,%22%3D%22,%22Participant_Contact_contact_id_01.id%22%5D%5D,%5B%22Address%20AS%20Participant_Contact_contact_id_01_Contact_Address_contact_id_01%22,%22LEFT%22,%5B%22Participant_Contact_contact_id_01.id%22,%22%3D%22,%22Participant_Contact_contact_id_01_Contact_Address_contact_id_01.contact_id%22%5D,%5B%22Participant_Contact_contact_id_01_Contact_Address_contact_id_01.is_primary%22,%22%3D%22,true%5D%5D%5D,%22having%22:%5B%5D%7D) on dmaster.demo.civicrm.org
  
  [![enter image description here](https://i.sstatic.net/gcIvm.png)](https://i.sstatic.net/gcIvm.png)
  [![enter image description here](https://i.sstatic.net/Ixsos.png)](https://i.sstatic.net/Ixsos.png)
  
  > **Comments:**
  > **username_4**: i think it is great that you are offering these examples so thought adding the screenshot would help protect the example beyond the next 'flush' (or am i wrong? will they stick around?)  
  > **username_3**: Good idea to include the screenshot, but actually it's all in the (very long!) URL so won't be flushed.  
  > **username_4**: ah. right. nice  
  
  ---
  
  ### Answer by username_5 on 2021-10-12. Score: 1
  
  The "group by" in your question is presumably [the sql construct](https://en.wikipedia.org/wiki/Group_by_(SQL)). CiviReport makes heavy use of sql to build it's results and has a 'group by' concept that is essentially an abstraction of that sql concept, though somewhat more flexible.
  
  But of course, it's always more complicated than you think, so the "group by" thing in CiviReport isn't always available, it's only there when it's been setup by whoever writes the civireport "template".
  
  If you are working with a report that doesn't have group by option already visible to you in the UI, it's probably not hard to add it. Look in the developer tab to provide the specific/template you're using for your report and you can probably get some more specific help.
  
  
  ---
  
  