Introduction to Reporting with SQL — the Ultimate Tutorial for Business Professionals

Working with the financial aspects of large and small enterprises can be a daunting task for a business professional. In this article, we’ll look at several ways of constructing the perfect SQL report. You’ve probably already heard about SQL from your colleagues or in other areas of your career. If you’re here, you’ve likely concluded that learning SQL will make your professional life easier – and you’re right! Today, we’ll take a look at some basic SQL to help you

Continue Reading

Non-Syntactic SQL Errors Spotted

A look at common errors that arise when writing code as an SQL beginner. Debugging, Headaches, and SQL If you’re new to SQL, you’ve probably already run into a myriad of errors. Don’t worry — you’re not alone. All developers make mistakes; it’s a normal part of the development process. The key to mastering any programming language, SQL being no exception, is understanding where the most common mistakes lie. Often, SQL errors are grouped into two categories: syntactic and non-syntactic.

Continue Reading

Organize Your SQL Queries with CTEs

Common table expressions (CTEs) allow you to structure and organize your SQL code. Being able to write organized queries is a necessity when you begin to move deeper into SQL, so if you want to become an SQL master, you need to know CTEs. The CTE has been part of standard SQL for some time now. CTEs – which are also called WITH statements – are available in all major RDBMS. When you use a CTE, it’s quicker and easier

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

Common SQL Window Functions: Positional Functions

Positional SQL window functions deal with data’s location in the set. In this post, we explain LEAD, LAG, and other positional functions. SQL window functions allow us to aggregate data while still using individual row values. We’ve already dealt with ranking functions and the use of partitions. In this post, we’ll examine positional window functions, which are extremely helpful in reporting and summarizing data. Specifically, we’ll look at LAG, LEAD, FIRST_VALUE and LAST_VALUE. It is worthwhile mentioning that LEAD mirrors

Continue Reading

Common SQL Window Functions: Using Partitions with Ranking Functions

You’ve started your mastery of SQL window functions by learning RANK, NTILE, and other basic functions. In this article, we will explain how to use partitions with ranking functions. Mastering SQL window (or analytical) functions is a bumpy road, but it helps to break the journey into logical stages that build on each other. In the previous Common SQL Functions article, you learned about the various ranking functions, which are the most basic form of window functions. In this article, we

Continue Reading

GET ACCESS TO EXPERT SQL CONTENT!