liveBook · Manning

Data aggregation

As explained in Data Analysis with LLMs

An aggregate function computes a summary value from multiple rows or matched records in a query result.

Data aggregation summarizes multiple rows or matched records, for example by counting them or calculating average earnings. section 5.2.2 section 5.4.3

A publisher sales summary

For a game-sales analysis, calculate average earnings per game for each publisher. A count aggregate can also count rows that meet a condition. section 5.2.2

 #1
MATCH (p:Person {name: 'Tom Cruise'})-[:ACTED_IN]->(m:Movie) 
RETURN count(*)                                 #2

See a Cypher query that counts the movies matched for Tom Cruise. section 5.4.3

How Data Analysis with LLMs covers it

How deep it goes
Defines row counts and publisher averages, while stopping short of a full SQL introduction.
Examples
Uses game-sales averages by publisher and a count of movies featuring Tom Cruise.
What you can do after
Evaluate aggregate queries that count matching records or calculate averages across records.
How it connects
Links aggregate functions to SQL queries and Cypher RETURN expressions.

Also explained in

Compare how 19 books explain data aggregation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data Analysis with LLMs. The section links point to the parts of the book it draws on.