Summary
In this chapter, we have learned about using list expressions, UNION
queries, and subqueries. We worked with multiple functions to process lists, using the reduce
function to calculate a single value by iterating through a list, using list comprehensions to manipulate lists, combining list comprehensions and the reduce
function with filter expressions to calculate a single value, using UNION
to combine the results of multiple queries, using UNION ALL
to keep the duplicates from multiple queries, using subqueries to apply to filters and for sorting UNION
queries, using subqueries to perform isolated updates, and finally using the IN TRANSACTIONS
clause, along with subqueries, to perform batch updates in separate transactions.
In the next chapter, we will take a deeper look at how lists and maps form the core of Cypher data types, and how these data types can make working with data much easier.