
Database creation scripts. Use utilities such as WinZip / WinRar / 7-zip in order to extract the compressed content.
In this lesson we're going to learn how to perform a basic SELECT statement in order to retrieve certain columns of a specific table. This lesson also covers several guidelines regarding the way of writing a "clean" and understandable query
You may not always want to retrieve the data as is. In some cases, you may want to display your data with certain calculations, or look at what-if scenarios (for example, you may want to know what the prices would look like after adding VAT).
In many cases, the column’s heading is not descriptive enough. In addition, different operations, such as: string concatenation or mathematical calculation, will change the column’s heading to be even less readable and more difficult to understand.
Column Aliases allow us to change the headings, and make them easy to understand and meaningful
The SELECT statement by default retrieves all rows, including rows containing duplicate values. The DISTINCT keyword is used to eliminate duplicate rows and display a unique list of values.
The WHERE Clause is used to restrict the rows returned from a query. While the previous chapter explained how to extract all rows from a certain table, using the WHERE clause, we are able to restrict our query to rows that meet specific certain condition.
For example: extract the employees whose salary is higher than 5000, or the employees who work at the HR department, and so on.
The IN Operator is used to test whether a value is “in” a specified list
The BETWEEN operator is used to retrieve values based on a certain range
The LIKE operator is used to perform a wildcard searches and retrieve rows that match a certain character pattern
NULL value indicates an unavailable or unassigned value. The value NULL does not equal zero (0), nor does it equal a space (‘ ‘). Because the NULL value cannot be equal or unequal to any value, you cannot perform any comparison on this value by using operators such as ‘=’ or ‘<>’.
In order to handle comparison against NULL values, we need to use the IS NULL / IS NOT NULL operators
The purpose of the AND & OR operators is to allow filtering based on multiple conditions. Using these operators, you can combine the result of two (or more) conditions in order produce a single result
In integer division and modulus, the dividend is divided by the divisor into an integer quotient and a remainder. The integer quotient operation is referred to as integer division, and the integer remainder operation is the modulus
Interim summary
The order of records retrieved by a query is by default - undefined. In order to specify the order in which rows are displayed, we can use the ORDER BY clause. This lecture explains how to sort the query result set in an ascending and descending order, and also how to sort it by multiple columns.
The LIMIT statement allows us to limit the number of records returned from a query, as well as displaying the number of highest/lowest rows, according to a certain condition (Top N Analysis).
Scalar Functions are used to carry out operations such as: mathematical tasks on numerical data, different manipulations on string and dates values, and NULL-related operations. This lesson provides an introduction to the various functions we're going to cover in the next upcoming lessons
String functions perform an operation on a string input value, and return a string or numeric value
Numeric functions perform a calculation, usually based on input values, and return a numeric value
Datetime related functions
NULL Related functions
Summary of all we've learned so far
The CASE statement goes through list of conditions and returns a value when the first condition is met (similar to an if-then-else statement)
In this lecture we're going to learn the concept of Group Functions. As you're about to see, Group Functions operate on sets of rows to give one result per group.
In the previous lesson we saw that Group Functions treats the table as one large group of data. In many cases you need to divide the table into smaller groups, so for example instead of getting the average salary of all employees, you would rather see, for example, the average salary grouped by each department. As you're about to see, that's the purpose of the GROUP BY clause
In this short lesson we're going to learn how to group the dataset by manipulated columns
The HAVING clause allows filtering of aggregated results produced by the GROUP BY clause. In the same way you used the WHERE clause to restrict rows, you use the HAVING clause to restrict aggregated results.
In this lecture we'll summarize all the clauses we've learned so far, and discuss the difference between order of syntax and execution.
Learn SQL data analysis by actually analyzing data :)
This course is by far the most extensive program for learning SQL by doing.
There are no shortcuts, If you want to gain a real understanding, and become ready for SQL interviews - you must practice a lot.
And this is what this course all about: allowing you to gain a real, tangible SQL data analyses skills the only way they can be achieved - by getting your hands dirty, and learning SQL by doing!
Build The Analytical SQL Skills You Need
This SQL course will empower you with the tips and tricks necessary to analyze real data by following industry best practices. You’ll become ready for SQL job interviews after learning how to perform more than a hundred tasks and analyses, across a dozen different case studies.
Develop Reliable Data Intuition
This isn’t something that can be taught without real experience, but thanks to our beginner-friendly course, you’ll gain constant exposure to different data sets which means that you’ll automatically gain a feel and understanding of handling other datasets in the future.
Show That You’ve Got What It Takes
Our Certificate of Completion shows not only the knowledge you acquired. Our certificate proves your willingness to go that extra mile, and put in the hours of practice in order to master your SQL Skills.
Think Like a Data Analyst
Being able to analyze data is one thing, but being able to think like a real data analyst is another ballgame altogether. Our video-guided instructions and practical exercises will teach you more about how you can approach and solve problems from a data analysis mindset.
Learn SQL From the Pros Who Love Teaching
This course was developed by data professionals who have been in the industry for more than 15 years. Everything you’ll learn is based on real, tangible experiences and skills that are used every single day, so make sure you pay attention! You’ll learn how to:
Write Clean, Understandable Queries
Approach and Solve Problems Like a Data Analyst
Use Different SQL Clauses Efficiently
Implement Practical Solutions
Join A Cross-Platform SQL Environment
Our beginner-friendly SQL course (and the professional SQL certification that comes with it) is applicable to MySQL, SQL Server, and PostgreSQL. You can switch from one to the other with ease thanks to the universal skills that our course will teach you.
We’re truly passionate about what we do
The satisfaction of our customers and students is our top priority. That’s why we can guarantee you’ll get the highest possible value out of our course!
Ready To Get Started?
You don’t need any experience to obtain our professional SQL certification. Simply enroll and start learning!