How Much do SQL Server Data Professionals Make?

salary

You’ve thought about your career, you can’t make up your mind about which direction you want to take it. You want to make an informed decision and work out if the career you chose will provide you with financial security you need. The good people at brentozar.com have been running a salary survey and the results are in, they make interesting reading. How much do SQL Server data professional’s make?

I don’t think anyone should choose a career because of the monetary rewards, not just the monetary rewards anyway. However, there is no doubt that financial security is something that most people strive for and potentially that security can give you the foundation for a happier life.

If you’re thinking of a career working with data as a data professional working with data technologies such as SQL Server, then I think the information provided in this survey is very interesting and it makes a good data to run some analytical queries against.

To interrogate the data I’ll use some simple queries that use the SELECT statement. I’ll also look at some aggregate functions and common table expressions (CTE).

The data came in an excel file, I used the data import wizard; which under the hood creates a simple SSIS package to import the raw data into a table named SalarySurvey into a test database.

COUNT(*), AVG, MAX and MIN

This first query here counts the number of replies, returns the mean salary in USD and returns the minimum and maximum value from the salaryUSD field:

SELECT COUNT(*) NoOfReplies
,AVG(SalaryUSD) AvgSalary
,MAX(SalaryUSD) MaxSal
,MIN(SalaryUSD) MinSal
FROM [dbo].[SalarySurvey]

We have a minimum salary of $430 – that is very low. Even if you take the fact that this is a worldwide survey and people in different parts of the world, will get different pay depending on the maturity of the economy of their country etc.

I also think that $1.45 million is a little high even for the most advanced or mature economies. Perhaps this person owns a company or runs a business and they are putting in their entire earnings but even so, it is likely to skew the mean salary for an average data professional.

Remove the Outliers

I will attempt to remove the outliers that might be skewing the results. In the first example I am creating a CTE removing the row with the highest and lowest values for salary USD. This example utilises a subquery in the WHERE of the CTE query, to remove the rows with the maximum and minimum values for SalaryUSD  in the main table. We can then query the CTE with those values removed:

;with salsurcte as (
SELECT *
FROM SalarySurvey
WHERE SalaryUSD > (SELECT MIN(SalaryUSD) FROM SalarySurvey)
AND SalaryUSD < (SELECT MAX(SalaryUSD) from SalarySurvey)
)
SELECT COUNT(*) NoOfReplies
,AVG(SalaryUSD) AvgSalary
,MAX(SalaryUSD) MaxSal
,MIN(SalaryUSD) MinSal
FROM salsurcte

Removing the highest and lowest values from the list, still leaves some extreme values in the list with a maximum salary of $1Million and the smallest salary being $545. I still think these have either been entered incorrectly or are definitely not the norm. To remove some of the more extreme values I will drop the highest and lowest 5% of values. This should remove most of the outliers from either end of the spectrum.

To do this, I will use a windowing function NTILE. The NTILE function as described by the SQL Server documentation “Distributes the rows in an ordered partition into a specified number of groups. The groups are numbered starting at one. For each row, NTILE returns the number of the group to which the row belongs.

Based on the salary USD value, each row will be allocated a bucket and given a tile number. Tile 1 has the 5% of highest values and tile 20 has the 5% lowest values. I’ll create query using a common table expression that removes the highest paid bucket and lowest paid bucket.

with ctess as
(select
NTILE (20) OVER (ORDER BY SalaryUSD Desc) as tile
,*
from SalarySurvey), ctetile as (
SELECT *
from ctess
WHERE tile > 1
and tile < 20 )
–NTILE will allocate each row a result)
SELECT COUNT(*) NoOfReplies
,AVG(SalaryUSD) AvgSalary
,MAX(SalaryUSD) MaxSal
,MIN(SalaryUSD) MinSal
FROM ctetile

Conclusion

These are very interesting results. Across the board I’d say that these are quite encouraging. The devil is in the detail and undoubtedly there will be regional differences. In my next post, we’ll dig in a little deeper and see what other factors can affect a data professionals salary, like the job you have and what your role entails. If you are new to SQL the Learning Tree 534 course Querying SQL Server databases will provide you with the skills and practices needed to develop queries to allow you to perform this type of analysis on your own data.

Type to search blog.learningtree.com

Do you mean "" ?

Sorry, no results were found for your query.

Please check your spelling and try your search again.