---
schema_version: "1"
id: c882f70a1bc188bc6326a1b5d12113a054fe931cae18f139ab40c72d98241639
title: Create a SOQL Query
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/admin_locales_soql.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.admin_locales_soql.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 3dc3bf58187e514c289e1b017676bc225573aee9d78a09e4453529748f794ac8
description: To gather details about locale use, like user count by locale, create a SOQL query
products:
  - Salesforce Platform
  - Cross Cloud
release: "264"
---
# Create a SOQL Query

To gather details about locale use, like user count by locale, create a SOQL query

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: all editions</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d143630e37">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d143630e37 ">To use the Developer Console:</td>
            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d143630e37 ">API Enabled AND View All Data</td>
          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d143630e37 ">To use code search and run SOQL or SOSL on the query tab:</td>
            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d143630e37 ">API Enabled</td>
          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d143630e37 ">To create, edit, and delete reports in private folders:</td>
            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d143630e37 ">Create and Customize Reports</td>
          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d143630e37 ">To create, edit, and delete reports in public and private folders:</td>
            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d143630e37 ">
              <p>Report Builder</p>
              <p>OR</p>
              <p style="margin-bottom:0;">Report Builder (Lightning Experience)</p>
            </td>
          </tr>
        </tbody>
      </table>

1. Click the gear icon (![A gray gear icon with a lightning bolt in the center.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-setup-264-0-0-production-enus/6f21df35-9ea0-4f53-ac94-45c3b5dfd5bc/resources-global/_corporate/images/gear.png)). Using Classic? Click your name in the upper right corner.
2. Click **Developer Console**.
    
    The developer console opens in a new window.
    
    ![The Developer Console with the Query editor in focus.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-setup-264-0-0-production-enus/6f21df35-9ea0-4f53-ac94-45c3b5dfd5bc/setup/images/admin_locales_dev_console.png)
3. To open the Query Editor panel, click **Query Editor** (1).
4. In the Query Editor panel (2), enter this query.
    
    ```sql
    SELECT toLabel(LocaleSidKey) LocaleName, LocaleSidKey, Count(id) UserCount FROM User where IsActive=true GROUP BY LocaleSidKey
    ```
5. Click **Execute** (3).
    
    Your results display in the Query Results grid in the Developer Console workspace.
    
    ![The Developer Console displays results of users across four locales.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-setup-264-0-0-production-enus/6f21df35-9ea0-4f53-ac94-45c3b5dfd5bc/setup/images/admin_icu_query_results.png)
    
    In this example, there are 4 locales in use across 10 users: 2 users with bn\_BD, 5 users with en\_US, 1 user with it\_IT, and 2 users with en\_HN.