Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Getting Started with the Graph Query Language (GQL)

You're reading from   Getting Started with the Graph Query Language (GQL) A complete guide to designing, querying, and managing graph databases with GQL

Arrow left icon
Product type Paperback
Published in Aug 2025
Publisher Packt
ISBN-13 9781836204015
Length 382 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Authors (3):
Arrow left icon
Ricky Sun Ricky Sun
Author Profile Icon Ricky Sun
Ricky Sun
Yuri Simione Yuri Simione
Author Profile Icon Yuri Simione
Yuri Simione
Jason Zhang Jason Zhang
Author Profile Icon Jason Zhang
Jason Zhang
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Evolution Towards Graph Databases FREE CHAPTER 2. Key Concepts of GQL 3. Getting Started with GQL 4. GQL Basics 5. Exploring Expressions and Operators 6. Working With GQL Functions 7. Delve into Advanced Clauses 8. Configuring Sessions 9. Graph Transactions 10. Conformance to the GQL Standard 11. Beyond GQL 12. A Case Study – Anti-Fraud 13. The Evolving Landscape of GQL 14. Glossary and Resources 15. Unlock Your Exclusive Benefits 16. Other Books You May Enjoy
17. Index

CALL procedures

GQL provides an inline procedure and a named procedure. Both procedures are invoked by the CALL keyword.

Inline procedures

GQL inline procedures are query blocks that can be called in another query.

They are particularly useful for handling complex data processes that cannot be managed with a simple linear query.

Example: Using CALL to count grouped neighbors

To determine the number of neighbors for each node, an aggregate function can be used.

For example, to calculate the number of neighbors for each node from the graph in Figure 7.5, use the following:

GQL:
MATCH (start)
MATCH (start)-(end)
RETURN start._id as startNode, COUNT(end) as total
GROUP BY startNode

The query returns each startNode and its total number of neighbors:

...

startNode

total

a

3

lock icon The rest of the chapter is locked
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Getting Started with the Graph Query Language (GQL)
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Modal Close icon
Modal Close icon