Happy Thanksgiving! Using SQL to Prepare a Traditional Menu

Thanksgiving is a holiday many Americans celebrate with their families and friends, seated around a table loaded with a hearty feast. The most prominent of all dishes is, of course, the turkey. However, at least a few other specialties are also cooked for Thanksgiving. Do you find it hard to choose what to prepare? If so, we’ve got a solution for you: a special SQL query that will help you pick the best dishes. Gathering Our Thanksgiving Recipes Before we

Continue Reading

SQL Window Functions By Explanation

In our previous post, we explained how SQL window functions work by example. We started with some very simple, basic functions. Let’s extend it by explaining subclauses in window functions. SQL window functions are a great way to compute results from a set of rows rather than a single row. As you know from our first article, the “window” in window function refers to the set of rows. We showed you some examples of simple window functions like RANK and

Continue Reading

Long SQL Query vs. Recursive SQL Query

Recursion is one of the central ideas in computer science. We can define it as a method for solving problems where the solution of the problem depends on solving a smaller instance of a problem. If this sounds complicated do not fret, in this article we will learn about recursion in SQL that you can practice and deepen in Vertabelo Academy. Recursion is a way of solving hierarchical problems we find in data with common SQL. These types of queries

Continue Reading

An Illustrated Guide to Multiple Join

So far, our articles in the “An Illustrated Guide” series have explained several join types: INNER JOINs, OUTER JOINs (LEFT JOIN, RIGHT JOIN, FULL JOIN), CROSS JOIN, self-join and non-equi join. In this final article of the series, we show you how to create SQL queries that match data from multiple tables using one or more join types. Join Types in SQL Queries Before we start discussing example SQL queries that use multiple join types, let’s do a short recap

Continue Reading

An Illustrated Guide to the SQL Non-Equi Join

Did you know that an SQL join doesn’t have to be based on identical matches? In this post, we look at the non-equi join, which uses ‘non-equal’ operators to match records. We’ve already discussed several types of joins, including self-joins and CROSS JOIN, INNER JOIN and OUTER JOIN. These types of joins typically appear with the equals sign (=). However, some joins use conditions other than the equals (=) sign. These are called non-equi joins, and they’re what we will

Continue Reading

An Illustrated Guide to the SQL Self-Join

What is an SQL self-join and how does it work? When should it be used? We’ll provide answers to those questions! In SQL, we can combine data from multiple tables by using a JOIN operator. JOIN has several variants; we’ve already discussed CROSS JOIN, INNER JOIN, and OUTER JOIN. Most of the time, these operators join data from two or more different tables. In this article, however, we will explain how to join records from the same table. A self-join

Continue Reading

GET ACCESS TO EXPERT SQL CONTENT!