---
schema_version: "1"
id: 72cd413754c0a4884f79386ef66cfb5142a105cb99bdebcdea5f6a63c89de293
title: Introducing SQL for CRM Analytics
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_sql/guides/bi-sql-intro.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-sql/guide/bi-sql-intro.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 828749a1903157f7fdc15de6186e07aec18b4c6b19972743ce4dab99285d70c5
products:
  - SQL for Analytics Developer Guide
  - analytics
---

# Introducing SQL for CRM Analytics

SQL for CRM Analytics is a query language that lets you execute queries against your CRM Analytics datasets. SQL (Structured Query Language) is typically used for working with data stored in relational databases—you might already be familiar with variants like MySQL and PostGreSQL. CRM Analytics uses the ANSI SQL interface to access CRM Analytics’s fast in-memory data store. It has native support of Salesforce features used in CRM Analytics, including sharing inheritance and custom fiscal calendars.

SQL for CRM Analytics supports these standard SQL features.

- `SELECT` Clause
- `FROM` Clause
- `WHERE` Clause
- `GROUP BY` Clause
- `GROUP BY ROLLUP`
- `GROUPING()`
- `HAVING` Clause
- `ORDER BY` Clause
- `LIKE` Clause
- `LIMIT` Clause
- `FETCH` Clause
- `OFFSET` Clause
- `CASE` statements
- `COALESCE()`
- `NULLIF()`
- `UNION` Operator
- Aggregate, windowing, math, and string functions
- Subqueries

**note:** These features don’t support the full range of cases covered by ANSI SQL. Refer to each statement in the SQL for CRM Analytics reference for more information.
