Hopefully, this chapter was full of interesting ideas for the developer and the DBA. In this chapter, we talked about complex queries; we then saw the SELECT statement and the use of the LIKE, ILIKE, DISTINCT, OFFSET, LIMIT, IN, and NOT IN clauses. We then started talking about aggregates through the GROUP BY and HAVING clauses, and we introduced some aggregate functions, such as SUM(), COUNT(), AVG(), MIN(), and MAX().
We then talked in depth about subqueries and joins. Another very interesting set of topics covered in this chapter were the UNION, EXCEPT, and INTERSECT queries. Finally, by looking at the advanced options for the INSERT, DELETE, and UPDATE instructions, and by covering CTEs, we gave you an idea of ​​the power of the SQL language owned by PostgreSQL.
As for the concept of aggregates, in the next chapter, we will see a new way to make aggregates using windows functions. Through the use of windows functions, we will see that we are able to create all...