# GQL ## Posts - [Association Rule Mining using GQL](https://gql.net/association-rule-mining-using-gql/): What is the most frequently bought item with Infant Formula and Infant Diapers? Association Rule Mining is a key to Market Basket Analysis. While Association Rule Mining is a complex topic, we can use SQL to figure out what items most frequently bought together. An association rule is a implication expression of the form X → Y, where X and Y are itemset. X is the Antecedent and Y is the Consequent Example of Association Rules {Infant Diaper} → {Coke},{Milk, Bread} → {Eggs, Coke},{Coke, Bread} → {Infant Milk}Antecedent → Consequent Now let’s assume we take {Infant Diaper, Infant Milk} as […] - [Aggregating Edge Weights in GQL](https://gql.net/aggregating-edge-weights-in-gql/): Often times we have to aggregate the weights along paths (edges) in a Graph. GQL provides a REDUCE function for this. We will use Ultimate Beneficial Ownership (UBO) graph to demonstrate this. A beneficial owner is defined as a physical person “who directly or indirectly owns or controls a sufficient part of the shares or the voting rights, or who practices control through other means.”. If a company is owned by another company (e.g. a holding company), it is the physical person(s) who ultimately own(s) the company who shall be registered as beneficial owner(s). Identifying Ultimate Beneficial Ownership (UBO) can […] - [Decomposing path into steps in Property Graphs - Part 2](https://gql.net/decomposing-path-into-steps-in-property-graphs-part-2/): In the post titled, , we looked at how we can unnest / flatten a path in Graph using GQL. In this post we will look at the how to identify each match when there are multiple paths . Let’s start with our basic Social Network example. We are interested in path(s) from Saqib to Uroosa. Notice that are two paths for that 1) Saqib -> Angela -> Scott -> Uroosa; 2) Saqib -> Fatima -> Eleni -> Uroosa. We are also interested in the exact nature of the relationship i.e. co-worker vs. friend. Let’s start by create a Graph […] - [Decomposing path into steps in GQL](https://gql.net/decomposing-path-into-steps-in-gql/): When working with Property Graphs, resolving the data path aka. decomposing Graph path is key to understanding the path traversed by a MATCH query in GQL. To facilitate this unnesting / flattening of path data, GQL provides few options. We will look at two options and apply them to following Graph to unnest the SHORTEST path between Alice and Diana i.e. Alice -> Chalie -> Diana Let’s start by creating a sample Sample Graph: First let’s use pnodes function to get the unnested path as a JSON. This will output a JSON array as following: Another way to UNNEST is […] - [Decomposing PATH into Steps using GQL](https://gql.net/decomposing-path-into-steps-using-gql/): Returning one or more paths during a graph traversal is a central feature of regular path queries in the GQL. To illustrate we will use the following example of a travel network: We are interested in all the SHORTEST PATHS available from Bayreuth to Santiago. Let’s start by creating a sample dataset We can use the following GQL to get all the possible SHORTEST PATHS. This will return each of the path decomposed into the each hop (step) as following In the above GQL Query a is matched to the city of Bayreuth, and b to Santiago city. The PATH(s) […] - [GQL Playground](https://gql.net/gql-playground/): We are working on a interactive GQL Playground. The GQL Playground will provide interactive learning experience with guided examples. Stay tuned! - [Linear Composition in GQL](https://gql.net/linear-composition-in-gql/): The workhorse of Graph Query Language (GQL) is pattern matching. GQL is oblivious to how a graph is stored. The table resulting from pattern matching is manipulated by a sequence of operators that modify it in an imperative style that that is referred to as “Linear Composition” or “Sequential Composition”. In “Linear Composition” we can simply add clauses to the already existing query which apply new operations to the result of already processed clauses. In the following example we will demonstrate how a sequence of operators can continue after the RETURN clause. Let’s start with a simple Graph. Let’s say […] - [Complex Pattern Matching in GQL](https://gql.net/complex-pattern-matching-in-gql/): The workhorse of Graph Query Language (GQL) is pattern matching. Pattern matching is done by specifying one or more path patterns in the MATCH clause. A single path pattern matches a linear path of vertices and edges, while more complex patterns can be matched by combining multiple path patterns, separated by comma. In this blogpost we will explore complex patterns. We will use the following sample Graph of Restaurants, Likes, Cities and Persons Let’s create some sample data Let’s say we are interested in the finding all the Liked Restaurants where the Restaurant is in the same City where the […] [comment]: # (Generated by Hostinger Tools Plugin)