Skip navigation
Courses
Pricing
For Students
SQL Library
Articles
Cookbook
Cheat Sheets
For Beginners
Best Way to Learn SQL
SQL Primer
Flashcards
About Our Courses
Guides
150+ SQL Practice Exercises
100+ SQL Interview Questions
SQL Interview Cheat Sheet
GROUP BY and Aggregate Functions Guide
SQL JOINs Guide
Window Functions Guide
Numeric Functions Guide
String Functions Guide
Common Table Expressions
Log in
Create free account
fullName
User profile menu open
Open user profile menu
fullName
Dashboard
My Profile
Payment & Billing
Log out
MENU
CLOSE
Courses
Pricing
For Students
Articles
Cookbook
Cheat Sheets
Best Way to Learn SQL
SQL Primer
Flashcards
About Our Courses
150+ SQL Practice Exercises
100+ SQL Interview Questions
SQL Interview Cheat Sheet
GROUP BY and Aggregate Functions Guide
SQL JOINs Guide
Window Functions Guide
Numeric Functions Guide
String Functions Guide
Common Table Expressions
Dashboard
My Profile
Payment & Billing
Log in
Create free account
Log out
Articles
Cookbook
20 Aug 2021
András Novoszáth
Why You Should Work in a Data-Driven Company
Does accessing and using data collected by your company feel painful? Have you heard about data-driven companies? Working in a data-driven company may give you the ownership and the opportunities to use your company’s data. Read our article to learn more! If you work in a company, chances are that you want to do data analysis to solve problems. However, this is often not easy. You face many obstacles, impeding access to the data you need.
Read more
19 Aug 2021
Himanshu Kathuria
The SQL AVG() Function Explained With Examples
We explain the SQL AVG() function with practical examples, covering how and where you can and cannot use it. The average is probably one of the most widely used metrics to describe some characteristics of a group. It is so versatile and useful that it can describe something about almost anything. If you like sports, you see things like average runs per game in baseball, average assists per game or per season in basketball, and so on.
Read more
18 Aug 2021
Kateryna Koidan
5 Practical SQL CTE Examples
Common table expressions (CTEs) were introduced into SQL to improve the readability and the structure of SQL queries, especially those requiring multiple steps to get the necessary output. In this article, we will go through several examples to show how SQL CTEs can help you with complex calculations and hierarchical data structures. Common Table Expressions in SQL Common table expressions (CTEs), also called WITH clauses, allow creating named subqueries that are further referenced in the main query.
Read more
17 Aug 2021
Himanshu Kathuria
How to Use CASE in SQL
If you need to evaluate multiple conditional statements, the SQL CASE statement will do the job. To effectively harness CASE in SQL, grasping its structure and practical uses is key. I'll guide you through real query examples showcasing the power of this versatile statement. Here’s what you need to know to use CASE like a pro. Why is CASE so important in SQL? If you’re analyzing or manipulating data, you’ll often want to define rules based on certain conditions, e.
Read more
12 Aug 2021
Martyna Sławińska
An Overview of MS SQL Server Data Types
SQL Server data types define what can be stored in a column, local variable, expression, or parameter. It is essential to pick the right data type. Ultimately. your choice of data types affects the whole database. Read on to learn about all of the data types available in MS SQL Server. In this article, we’ll cover numerical, text, and date and time data type categories in detail. We’ll go through their syntax, storage size, and typical use cases.
Read more
11 Aug 2021
Tihomir Babic
How to Find the Nth-Highest Salary by Department with SQL
Learn how to find the nth-highest salary in SQL, and you’ll learn how to get the nth value in any data. In this article, I’ll focus on one problem and give you several solutions to that problem. The problem is stated in the title already: find the nth-highest salary by department using SQL. This may sound too specific. But by learning how to solve this, you’ll be able to find the nth value in any data, not just salaries.
Read more
10 Aug 2021
Andrew Bone
What Is the UPDATE Statement in SQL?
The SQL UPDATE statement is used to update existing data in your database. This article will explain its syntax and show you clear examples of the UPDATE statement in action. Effectively updating existing data in a database is required for anyone using SQL; data is only useful if it is kept up-to-date and relevant. In this article, we’ll examine the syntax of the UPDATE statement in great detail. Then we’ll dive into detailed step-by-step examples that will drive home the rules, potential uses, and limitations associated with the SQL UPDATE statement.
Read more
6 Aug 2021
Karolina Niewiarowska
I Needed a Good SQL Course… So I Chose SQL Basics.
Why did I decide to take a SQL course? And how did I come across LearnSQL.com? It’s story time! Did I ever think that my professional career would deal with databases? Absolutely not. It didn’t even cross my mind that it would happen. Let me explain why I started learning SQL … and how I got to where I am today. Meet the SQL Newbie I suppose few people have their lives planned from A to Z.
Read more
5 Aug 2021
Ignacio L. Bisso
How to Define a Window Frame in SQL Window Functions
The window function is a super powerful resource of the SQL language. At the core of any window function, there is a set of records, called the window frame, defined using an OVER clause. Knowing what records are in the window frame, how they are ordered, and what their upper and lower bounds are, are critical in understanding how window functions work. In this article, we will analyze and explain with examples how you can define different types of window frames.
Read more
4 Aug 2021
Andrew Bone
Use SQL on a Movie Database to Decide What to Watch
We’ll demonstrate how to use SQL to parse large datasets and gain valuable insights, in this case, to help you choose what movie to watch next using an IMDb dataset. In this article, we’ll be downloading a dataset directory from IMDb. Not sure what to watch tonight? Are you browsing Netflix endlessly? Decide what to watch using the power of SQL! We’ll be loading an existing movie IMDb dataset into SQL.
Read more
««
«
1
2
3
41
42
43
82
»
»»