
All course is hands-on where you have to run all code with the lectures.
Create a DB design for your day to day work data that you use in Excel
Understand what you can do and what you cannot do. Or rather how hard or simple it is to do some analytical steps in SQL.
Understand Data Wrangling using Group, Joins and Union to get data in the format you need
For any data that comes to you new tools get new insights - Opening your mind!
Get Excel equivalent functions for SQL commands - Yes there is an equivalence!
Understand the data wrangling terms often used in Data Analytics that remain common to all languages (Python / R / SQL)
Distributions of SQL:
MS SQL Server Microsoft
Oracle SQL PL
MySQL - Web Open Source MyPHPAdmin (Oracle but free)
PosgreSQL - Open source
DB2 - IBM
Implementation Platforms:
AWS Amazon
Google Cloud
Azure Microsoft
Different Roles in SQL World:
Data Analytics / Business Intelligence (Pulling Cubes, Warehousing, Graphics on Tableau)
Database Developer (Creating, security, design)
Data Warehouse devleoper (Data mining)
Database Security Expert (Rights and Access)
Database Admin (OLTP Data)
Websites to run MySQL code (Ephemeral):
https://www.db-fiddle.com/
http://www.sqlfiddle.com/
Supports SQL Server:
http://rextester.com/l/mysql_online_compiler
Creating a Database for Attendees
Which columns should we add? Deciding in the data
How many tables we should make? Normalization into difference tables
What we will do with the data? Analytics and may be predictive analytics
CREATE TABLE Attendees (
PersonID int,
Heroname varchar(255),
Age int,
Assets int,
Sector varchar(255)
);
INSERT INTO Attendees ( PersonID ,Heroname , Age , Assets , Sector )
VALUES (1, 'Spider Man ', 32, 300000, ‘Fin’);
Data Types (INT, CHAR and BOOLEAN)
When to use Quotes (Single vs Double)
Char uses quotes but not in number or boolean
Color Convention - reserved keywords, strings numbers
Code beautify
https://codebeautify.org/sqlformatter
Selecting info from a table:
select * from attendees; select * from avgsalary;
Calculation on columns:
select *, assets/salary as frugalmeasure from attendees order by frugalmeasure desc;
Subquery example:
select * from attendees where city in (select city2 from avgsalary where avgsalary >10000)
Remainder function Mod example:
SELECT * FROM attendees WHERE Mod(personid, 2) = 0;
Find the person with Max salary:
SELECT Max(assets) FROM attendees WHERE assets Not IN (SELECT Max(assets) FROM attendees);
Casting number to Character for string concatenation:
select * , concat (cast(assets/1000 as CHAR), 'k') Assetsink from attendees
Case statement to display Queens and Others by checking each value:
SELECT heroname, CASE WHEN city = "Q" THEN "Queens" ELSE "Other City" END FROM attendees;
Join needs a common column
This is for SQL server as Full outer join not supported in MySQL
select * from attendees full outer join avg salary on attendees.city = avgsalary.city2
Below works with MYSQL:
select * from attendees inner join avgsalary on attendees.city = avgsalary.city2
Creating Alias and then joining:
select * from ( select * from Attendees where Age>60 ) A join Avgsalary on A.City = Avgsalary.City
Union stacks one table below the other:
SELECT * from Avgsalary union all select * from Avgsalary2;
Flat file saved in CSV vs SQL vs Excel
Here the questions would be which kind of analytics you want to run and the complexity and size of the data.
Excel gives equivalent what we do in SQL
Vlookup = Joins
Pivots = Group by
Vlookup in an equivalent of what?
Joins (but to be specific it is Left Join)
How can we do group by in Excel?
By Running Pivot Table commands - there is no other way to aggregate things in Excel.
What does pivot table means?
In SQL it can be done by Group by and Pivot (SQL Server)
Power BI and Cubes?
Power BI and Cubes let us do all the joins, group by and charting and filtering in a very complicated environment to do a holistic analytics for the company data.
Speak aloud in Write in English in a succinct way to do the following:
Calculate average salary of the class
Calculate average salary of all fin sector
Calculate average age of all sector
Put across every name the rating (what will we call this)
Take column and create new columns
SQL 101 Bootcamp is build up based on the SQL classes for Analytics taken in NYC, New York by Shivgan Joshi. Having taught at various bootcamps in NYC and gathering feedback from students this course addresses all the major topics you need to get started for Analytics in SQL if you have never programmed.
This course will help you answer and critically think and implement:
Create a DB design for your day to day work data that you use in Excel
Understand what you can do and what you cannot do. Or rather how hard or simple it is to do some analytical steps in SQL.
Understand Data Wrangling using Group, Joins and UNION to get data in the format you need
For any data that comes to you new tools get new insights
Get Excel equivalent functions for SQL commands
Understand the data wrangling terms often used in Data Analytics that remain common to all languages (Python / R / SQL)
Other areas that will be introduced to are:
Understand why SQL is needed as a solution to limitation of excel
Connect to the SQL Server database and execute a simple query.
Include a search condition in a simple query.
Use various functions to perform calculations on data.
Organize data obtained from a query before it is displayed on-screen.
Use New York City data for running on SQL