# Tag: Sql for Advanced

## How to Become a Database Analyst

Curious about becoming a database analyst? Maybe you’ve taken some database courses at university and they really struck a chord. Or maybe you learned online. Now you’re thinking about making a career out of working with databases. Where would you start? What should you expect at each phase of your professional development?
In this post, we’ll explore the challenging and exciting world of databases analysis. We’ll go from the very beginning of a career to the apex of professional success.

## Introduction to ggplot2

Show, don’t tell! Share data insights in stunning color and display with ggplot2, a wonderful R package for visualizing data.
Ggplot2: Grammar of Graphics The end of qualitative data analysis should be clear—beautiful data visualizations. We are visual beings, after all, and a picture tells us far more than raw numbers! Among the many visualization tools, one in particular stands out : ggplot2—a free, open-source, and easy-to-use package that has become a favorite among many R programmers.

## High-Performance Statistical Queries: Dependencies Between Discrete Variables

In my previous article, we looked at how you can calculate linear dependencies between two continuous variables with covariance and correlation. Both methods use the means of the two variables in their calculations. However, mean values and other population moments make no sense for categorical (nominal) variables.
For instance, if you denote “Clerical” as 1 and “Professional” as 2 for an occupation variable, what does the average of 1.5 signify?

## Busy Business Professionals: Simplify Your SQL Code with Recursive Queries

Hey SQL users! Are you repeating the same query in every report? Are your queries getting too complicated? Organize them with recursive queries!
Too many SQL reports can lead to clutter on your desktop and in your head. And is it really necessary to code each of them separately? Ad-hoc queries can share much of the same SQL code with managerial reports and even regulatory reports.
Suppose you’ve been writing basic SQL queries for a while.

## Common SQL Window Functions: Positional Functions

Positional SQL window functions deal with data’s location in the set. In this post, we explain LEAD, LAG, and other positional functions.
SQL window functions allow us to aggregate data while still using individual row values. We’ve already dealt with ranking functions and the use of partitions. In this post, we’ll examine positional window functions, which are extremely helpful in reporting and summarizing data. Specifically, we’ll look at LAG, LEAD, FIRST_VALUE and LAST_VALUE.

## Common SQL Window Functions: Using Partitions with Ranking Functions

You’ve started your mastery of SQL window functions by learning RANK, NTILE, and other basic functions. In this article, we will explain how to use SQL partitions with ranking functions.
Mastering SQL window (or analytical) functions is a bumpy road, but it helps to break the journey into logical stages that build on each other. In the previous Common SQL Functions article, you learned about the various rank functions, which are the most basic form of window functions.

## Common SQL Window Functions: Using Partitions with Ranking Functions

You’ve started your mastery of SQL window functions by learning RANK, NTILE, and other basic functions. In this article, we will explain how to use SQL partitions with ranking functions.
Mastering SQL window (or analytical) functions is a bumpy road, but it helps to break the journey into logical stages that build on each other. In the previous Common SQL Functions article, you learned about the various rank functions, which are the most basic form of window functions.

## SQL Window Functions by Example

Interested in how SQL window functions work? We use some simple examples to get you started.
SQL window functions are a bit different; they compute their result based on a set of rowsrather than on a single row. In fact, the “window” in “window function” refers to that set of rows.
Window functions are similar to aggregate functions, but there is one important difference. When we use aggregate functions with the GROUP BYclause, we “lose” the individual rows.

## High Performance Statistical Queries –Skewness and Kurtosis

In descriptive statistics, the first four population moments include center, spread, skewness, and kurtosis or peakedness of a distribution. In this article, I am explaining the third and fourth population moments, the skewness and the kurtosis, and how to calculate them.
Mean uses the values on the first degree in the calculation; therefore, it is the first population moment. Standard deviation uses the squared values and is therefore the second population moment.