diff --git a/tech/sql.wiki b/tech/sql.wiki index 950d8ca..7ec2a4a 100644 --- a/tech/sql.wiki +++ b/tech/sql.wiki @@ -97,6 +97,18 @@ If we want to find an average, `SELECT AVG(price) FROM products` +This same principle applies for + +* `MAX` +* `MIN` + +=== GROUP BY === + +`GROUP BY` allows us to combine with the above math and `COUNT` functions by +grouping totals based upon some other row. + +`SELECT Team, COUNT(*) FROM Players GROUP BY Team` + == Views == A view can be created with the following command