I think this more accurately shows how to query total products ordered by each user, not as mentioned in the text above, order (these entries) by the total orders count. That's why we count the product_id column in the pivot table and not the id column in the orders table
I think this more accurately shows how to query total products ordered by each user, not as mentioned in the text above, order (these entries) by the total orders count. That's why we count the product_id column in the pivot table and not the id column in the orders table