logo
Course

Aggregates - Average

In this lesson, we will learn how to use the avg aggregate function to calculate the average of a field in a Prisma query. We will use the avg function to calculate the average of the price field in the Product table. In the previous lesson, we were able to use the .count() aggregate function to count the number of records in a table. Count is the only aggregate function that has it's own method attached to the Prisma table object- for all other aggregate

The rest of this lesson is waiting.
Join JS Mastery Pro to unlock it.

gsap
javascript
nextjs
react native
threejs

Get Full Access

$149 /month

Lock in a year & save—2 months free!

  • Access to all courses

  • Quizzes, mini-challenges, AI summaries, inline sandboxes

  • Participation in a private community

  • Build real production-grade apps

  • Mock interviews & project reviews

  • Weekly live sessions & member-only access