Skip navigation
Courses
Pricing
For Students
SQL Library
Articles
Cookbook
Cheat Sheets
For Beginners
Best Way to Learn SQL
SQL Primer
Flashcards
Guides
SQL Practice
GROUP BY and Aggregate Functions
SQL JOINs
Numeric Functions
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
SQL Practice
GROUP BY and Aggregate Functions
SQL JOINs
Numeric Functions
Dashboard
My Profile
Payment & Billing
Log in
Create free account
Log out
Articles
Cookbook
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
Updated on: February 19, 2024 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
3 Aug 2021
Jakub Romanowski
Free Course of the Month: SQL Reports in SQL Server
This is another in our series of free SQL Courses of the Month. This time, you can learn SQL Reporting in MS SQL Server for free. Do you want to be able to prepare even better SQL reports? Or maybe you have some basic knowledge of SQL Server (one of the major SQL dialects) and would like to go a step further? This is the course for you.
Read more
1 Aug 2021
LearnSQL.com Team
New Monthly SQL Practice for August 2021!
Do you have basic skills in SQL? Do you know how to write SQL queries? If the answer is yes, you can test your knowledge by solving business problems with our SQL Practice, available every month on LearnSQL.com. The August SQL Practice is at the basic level. You will check your SQL skills with data about a travel agency. The company organizes trips through different cities in the state of Illinois in the US, connecting its clients to many attractions.
Read more
««
«
1
2
3
35
36
37
80
»
»»