Business Analysis and SQL
Many Business Analyst roles today want some some kind of coding experience and its certainly advantageous to have. This may range from Python, R or something else, but, by far the one I see that appears the most is a demand for SQL.
This can be daunting for new Business Analysts or those who are more experienced and looking to jump to that next role that requires experience with SQL, but dont worry its very simple to get started!
I've put together a quick basics introduction guide below and linked to some further resources below which will help take those that are interested to the next steps in their SQL journey.
What is SQL and what is its history?
SQL stands for Structured Query Language and was originally created in the early 1970s by Donald D Chamberlin and Raymond F Boyce.
There are many different flavours of SQL but apart from some syntax differences are broadly the same. Transact SQL (T-SQL) is one of the most popular ones.
What can I do with SQL?
The main use for Business Analysts for SQL will be data retrieval this could be to help with a use case, conduct some analysis or pull some data for another area of a business. To help with this I have shown below what a SQL statement looks like at its most basic:
SELECT FIELD FROM MYTABLE
Lets take this statement apart word by word:
SELECT
This is always needed and always goes at the start of the statement. It says what we are going to be doing, in this case selecting something.
FIELD
This is is changeable and would be where you put in the data field you want to return. This can be more than one, but each fields needs to be separated by a ','. In terms of data this could be a name, a date of birth or anything.
FROM
This, like SELECT will always be needed and this tells us that we need to take the data FROM somewhere.
MYTABLE
This is changeable and you would put in where you want to take the data from. This needs to be the name of your data source.
Ok so I understand that but what else can I do with SQL?
There are so many other ways we can enhance our basic query above. For example we can add in WHERE, ORDER BY, GROUP BY statements.
SELECT FIELD FROM MYTABLE
WHERE FIELD =
This allows us to filter the data to certain information and helps us to refine a data set to a be more refined.
SELECT FIELD FROM MYTABLE
ORDER BY FIELD DESC
This allows us to filter the data to certain information and helps us to refine a data set to a be more refined.
SELECT FIELD FROM MYTABLE
GROUP BY FIELD
This allows us to group by fields and is very useful when doing and counts or sums on the data.
Further Learning
I've detailed out some further learning resources below and split these into online resources and offline resources.
Recommended Books
Head First SQL - Great book that covers the basics in a really beginner friendly way.
T-SQL Fundamentals - This is a superb book and really helps to talk through a lot of basic SQL concepts but goes further and into more detail.
Comments
Post a Comment