WK4 Continuous learning in SQL Flashcards
Aggregate functions
n SQL, aggregate functions are functions that perform a calculation over multiple data points and return the result of the calculation. The actual data is not returned.
There are various aggregate functions that perform different calculations:
- Count
- AVG
- SUM
Aggregate functions
Count
COUNT returns a single number that represents the number of rows returned from your query.
SELECT COUNT(firstname)
FROM customers;
SELECT COUNT(firstname)
FROM customers
WHERE country = ‘USA’;
+——————+
| COUNT(firstname) |
+——————+
| 59 |
+——————+
Aggregate functions
AVG
AVG returns a single number that represents the average of the numerical data in a column.
Aggregate functions
SUM
SUM returns a single number that represents the sum of the numerical data in a column.
Continuing to learn SQL
SQL is a widely used querying language, with many more keywords and applications. You can continue to learn more about aggregate functions and other aspects of using SQL on your own.
Most importantly, approach new tasks with curiosity and a willingness to find new ways to apply SQL to your work as a security analyst. Identify the data results that you need and try to use SQL to obtain these results.
Fortunately, SQL is one of the most important tools for working with databases and analyzing data, so you’ll find a lot of support in trying to learn SQL online. First, try searching for the concepts you’ve already learned and practiced to find resources that have accurate easy-to-follow explanations. When you identify these resources, you can use them to extend your knowledge.
Continuing your practical experience with SQL is also important. You can also search for new databases that allow you to perform SQL queries using what you’ve learned.
Key takeaways
Aggregate functions like COUNT, SUM, and AVG allow you to work with SQL in new ways. There are many other additional aspects of SQL that could be useful to you as an analyst. By continuing to explore SQL on your own, you can expand the ways you can apply SQL in a cybersecurity context.