In these lessons, we'll learn about the different types of window functions in SQL. In this lesson, we'll explore the fundamentals of a window function and their importance in SQL queries. Window functions are special SQL functions that operate in specific windows of rows within a result set. Unlike aggregate functions, window functions do not reduce the number of rows in the output. When creating window functions, we have several advantages, including simplifying complex queries, efficient calculations, and we're able to derive analytical insights. Let's look at this first query where we'll add a unique sequential number to each row. So for a simple query, we'll use a select statement as well as the product ID and product name columns. Then we'll use the row number function with the over keyword to assign our sequential order. Then we'll define our order based on our product ID column. Then we'll just go ahead and alias or give this column a new name of row underscore number. And last, all this information is coming from the products table. Let's go ahead and run this query by pressing control enter. And this is a simplistic example, but we can see here that our row number column corresponds to our product ID column by adding a sequential row. Let's dig a bit deeper by now assigning a rank to each product based on its price. So for this query, we'll incorporate the price column. But for this query, we'll use the rank function with the over keyword. And for this use case, we want to order by the price in descending order to see the highest value prices. And again, we'll go ahead and give this a descriptive new column name, product rank by price. So let's go ahead and run this by pressing control enter. And we can see here we have now ranked our products table based on the price column. Let's continue down this analysis path by dividing our products into three equal groups based on their price. So to accomplish this, we'll include the end tile function followed by the number of groups, in this case three. And again, we'll use the over keyword. Once again, we want to order by the price column. And we'll also give this column a name of price underscore group. Let's go ahead and run this by pressing control enter. And we can see now that we put this in ascending or the default order. Our price groups are based on the lowest prices going to the most expensive prices. In this lesson, we've explored the fundamentals of window functions in SQL. Window functions provide us a way to simplify complex calculations, enhance our analytical capabilities, and all this without reducing the number of rows in our result set. Thanks for watching. Stay tuned for the next lesson where we incorporate partition by clause in our window functions.