How to Draw a Christmas Tree in SQL

You can use SQL to manipulate all kinds of data, from huge analytical queries to brief single-purpose statements. But you can also use SQL just for fun, without any business requirements stifling your creativity. So, get out your jolly hat and prepare to sing O Christmas Tree as we create some quirky art with plain old SQL. Today, we’re going to generate some holiday-themed ASCII art, just for fun. That’s right. I said fun. This exercise has absolutely zero business

Continue Reading

Busy Business Professionals: Simplify Your SQL Code with Recursive Queries

Hey SQL users! Are you repeating the same query in every report? Are your queries getting too complicated? Organize them with recursive queries! Too many SQL reports can lead to clutter on your desktop and in your head. And is it really necessary to code each of them separately? Ad-hoc queries can share much of the same SQL code with managerial reports and even regulatory reports. Suppose you’ve been writing basic SQL queries for a while. Eventually, you realize something:

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

GET ACCESS TO EXPERT SQL CONTENT!