WK4 Continuous learning in SQL Flashcards

1
Q

Aggregate functions

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Aggregate functions

Count

A

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 |
+——————+

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Aggregate functions

AVG

A

AVG returns a single number that represents the average of the numerical data in a column.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Aggregate functions

SUM

A

SUM returns a single number that represents the sum of the numerical data in a column.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Continuing to learn SQL

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly