Blog Posts

The SQL Coalesce Function: Handling Null Values

coalesce, NULL, sql null, sql coalesce, coalesce oracle, coalesce vs isnull, coalesce db2, coalesce teradata, coalesce example, coalesce vs nvl, coalesce in hive, coalesce mysql

Though the COALESCE function may seem complex, it’s actually very straightforward and useful. In this short article, we’ll look at several examples of how the COALESCE function can be used to work with NULL values in SQL. The Need for Coalesce Before we dive into the COALESCE function in detail, you should understand how NULL values behave in expressions. Simply put, a value of NULL indicates that there is currently no value for a particular entry in a table column.

Continue Reading

New Vertabelo Academy Course: Learn How to Work with Spatial Data with PostGIS

Managing spatial data is useful but challenging – learn how to do it in PostgreSQL with our latest course. At Vertabelo Academy, we believe that learning by doing is the best way to master a new skill. So we’re excited to introduce a new, easy-to-understand course in PostGIS. PostGIS is a spatial extension for object-relational PostgreSQL databases. It stores geographical data objects, allowing SQL queries to process them as they would other pieces of data. PostGIS makes spatial data easier

Continue Reading

Digging Into Data: Explore and Analyze Survey Results With SQL

Excel is a powerful beast that lets you analyze complex data. Yet, operating on big chunks of data can sometimes be a daunting task. Let’s take a look at how SQL can help. Today, we’ll tackle a common problem with importing data to an SQL database, using a real-life example. Suppose your company conducted a survey on the most popular programming trends and preferences, striving to meet the expectations of its users. Your user base was overwhelmingly responsive, as the

Continue Reading

How Often Employees Are Running Late: Datetime And Interval Arithmetic in SQL

Computing Tardiness: Date, Time, and Interval Arithmetic in SQL In this article, we’re going to discuss some interesting operations we can perform with date-related data types in SQL. The SQL standard, which most relational databases comply with these days, specifies the date-related data types that must be present in relational databases. The most important of such data types are date, time, timestamp, and interval. Here’s a brief rundown of the differences between these data types: date: represents a single day

Continue Reading

SQL Hacks To Control Family Budget On Black Friday Weekend

If you’re in the US, chances are you’ve been eagerly awaiting the approach of Black Friday just as much as Thanksgiving. Though the shopping frenzy takes hold of nearly everyone, some people have to stick to their budgets and shop prudently. In this article, we’ll take a look at how generating an SQL report can help you track how much your family spent shopping on Black Friday. Storing Black Friday Purchases in a Database Before we can create an SQL

Continue Reading

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

GET ACCESS TO EXPERT SQL CONTENT!