From d30bd007d59a545b66f5678a581e3f57a9eaf6c0 Mon Sep 17 00:00:00 2001 From: Tyler Perkins Date: Mon, 28 Feb 2022 17:00:01 -0500 Subject: [PATCH] Update for 28-02-22 17:00 --- tech/sql.wiki | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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