---
schema_version: "1"
id: bcce420e34dd70096f66bfd36673764c4a1f06e54148010fea489d214273ec15
title: Property Graph Queries
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/data-cloud-query-guide/references/data-cloud-sql-reference/pgq/pgq-context.md
canonical_url: https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/pgq-context.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: ac38bb3981ec878b1ade41e1c31d080753074eb5f737291587fcec7962395f22
products:
  - Data 360 Query Guide
  - Data 360 Developer Documentation
---
# Property Graph Queries

**Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API

Property Graph Queries (PGQ) let you ask relationship questions about your Data 360 objects in SQL. Instead of joining customers to orders to products again and again, you define those connections once as a graph and then match paths.

For an ecommerce site, the usual questions look like this.

- Which products did Avery order?
- Which customers ordered the same product?
- Which path connects a customer to a product through an order?

A property graph has three parts.

- **Vertices** are the records: customers, orders, and products.
- **Edges** are the connections: a customer placed an order, and an order includes a product.
- **Properties** are the fields you want to filter or return, such as a first name or quantity.

Define the graph in a [`WITH`](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/sql-commands/select-with.md) clause, then query it with [`GRAPH_TABLE`](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/graph-table-match.md). The `COLUMNS` clause turns matched properties into ordinary result columns.

## When to Use PGQ

Use PGQ when the question is about a path among records. Use ordinary SQL joins when you need one table's rows plus a few lookup fields.

The commerce examples in this section use the Individual, Sales Order, Sales Order Product, and Goods Product DMOs. A customer places an order, and the order line item points to the product.

## Supported and Unsupported Features

Data 360 supports a subset of the SQL/PGQ standard.

| Feature                                                                                         | Support              |
| ----------------------------------------------------------------------------------------------- | -------------------- |
| Inline property graph definition, [`WITH pg AS PROPERTY GRAPH (...)`](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/define-property-graph.md) | ✅ Supported         |
| Persisted property graphs, `CREATE PROPERTY GRAPH`                                              | ❌ Not supported     |
| [`GRAPH_TABLE`](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/graph-table-match.md) with `MATCH`, `COLUMNS`, and `WHERE`                      | ✅ Supported         |
| [`ONE ROW PER MATCH` and `ONE ROW PER STEP`](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/result-modes.md)                                   | ✅ Supported         |
| [Multi-hop and quantified paths](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/path-patterns.md)                                              | ✅ Supported         |
| [Label expressions](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/label-expressions.md) (conjunction, disjunction, negation, wildcard)        | ✅ Supported         |
| Fixed and range edge quantifiers, [`{n}` and `{m,n}`](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/path-patterns.md)                         | ✅ Supported         |
| A quantifier lower bound of `0` (for example, `{0,3}` or `{,2}`)                                | ❌ Not supported yet |
| Unbounded quantifiers (for example, `{2,}`)                                                     | ❌ Not supported yet |
| The `*`, `+`, and `?` quantifier forms                                                          | ❌ Not supported yet |
| Shortest-path queries                                                                           | ❌ Not supported yet |

## Related Documentation

- [Defining a Property Graph](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/define-property-graph.md)
- [Querying with GRAPH_TABLE and MATCH](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/graph-table-match.md)
- [Path Patterns and Quantifiers](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/path-patterns.md)
- [Label Expressions](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/label-expressions.md)
- [Result Modes: ONE ROW PER MATCH and ONE ROW PER STEP](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/result-modes.md)
- [Cross-Label Property Access](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/cross-label-property-access.md)
