“Nail the basics first, detail the details later — Chris Anderson”
This will be the 2nd “Explained Like you are 5" series for Must have skills for Data Analytics that I am writing about. (Please watch the first one(Power BI) from here). Next ones are Python and Excel. Then,We will have all the basic skills that are required and then can move to next stages in the field of data analytics.
Remember we have data in TABLES. Whatever we can do with that data, that’s where SQL comes in.
For Eg. creation of tables,updating the tables, see existing tables, joining different tables, finding insights the data from tables etc. If you understand this part then it would be easier for you imagine when we go to the technicals.
SQL — Standard Language to interact with a Relational Database.
Relational Database: Multiple Tables with rows and columns(Look above image).
Link for more details : Introduction to Tables
let's see what a data analyst do on a day-to-day basis in SQL. It can be categorized into 3 steps:
1. DDL(Data Definition Language) and DML(Data Manipulation Language) - Defining the Tables (Doing everything related to the creation of the data like the creation of table, inserting data in the table, deleting the table, etc.)
(For Advanced users: It is basically creating the data pipelines for SQL from another data source.)
2. DQL(Data Query Language) - Writing SQL commands to find particular inights from the database.(You will spend most of your time here writing commands.)
3. DCL(Data Control Language) - Basically security regardinig who can see the which data(tables).
PROCESS OF USING SQL:
Typically What happens is data(tables) is stored on a SQL server(eg. Microsoft SQL Server or on a cloud server(eg. Azure, AWS), etc. On the Server, we usually write SQL queries to perform certain operations. (Refer to Image Below)
I have found that the best way to learn a skill is by learning the basics(which we have done) and then just doing different projects related to the skill.
I have looked into various websites on where to practice SQL questions. The best place for beginners is SQLZOO and W3Schools. They are free and only confined to practicing SQL. (No Distractions whatsoever).
*If you want to be more creative, You can install MySQL and try to use SQL using Python on your current PC. (Link for the Same).
Tip: After Reading the article, close all other tabs (including this one) from your browser and start practicing.
MAIN CONCEPTS TO LEARN IN SQL:
After Practicing the basics of SQL, we need to practice these concepts to get more fluent in SQL.Use the above-mentioned links for practice.
- Keys and Indexes
- Windows Functions
- CTE(Common Table Expressions) and Views
- Stored Procedures
We have covered what is SQL. How to use SQL? Now, Why SQL?
1. I will be blunt. You will not be able to grow in the data analytics field if you do not learn SQL. This is Essential. As Companies are churning out billions of data, it is imperative you learn SQL.
2. Every big company, be it of any industry if they are using data in any way for their business uses SQL in one way or the other. As most of the data is still present in Relational Databases SQL is required for any data analyst to perform day-to-day activities.
That’s It. Hope It helped in getting started in SQL. Once you are comfortable using SQL. It is quite interesting once you actually find insights from the data.
All the best.
Please Start. You will not regret it.