Synopsis: Ambiguous Groups

Let's learn how using ambiguous groups causes an antipattern.

Suppose that your boss needs to know which projects in the bugs database are still active and which projects have been abandoned. One report they ask you to generate is the latest bug reported per product. You write a query using the MySQL database to calculate the greatest value in the date_reported column per group of bugs sharing a given product_id. The report looks like this:

Get hands-on with 1200+ tech skills courses.