Author: Marian Dziubiak

Junior Technical Writer @ Vertabelo

Opening the Door to SQL Window Functions

window functions,
When you want to analyze data in a database, you need SQL window functions. What are they? How do they work? Read on to find out. There are two ways people use databases. One way is for the creation, modification and deletion of data. The other is analyzing the data, which means getting answers to specific questions. The more precise the questions you ask, the more tools you’ll need to answer them efficiently.

Using Transactions to Prevent Database Errors

What happens when a database receives commands from two different users? We look at the problems that can arise and how to avoid them. Every time you execute a statement in your database, you change the database’s state. When working in a multi-user environment with asynchronous database access, it will sometimes happen that two users are trying to change the same record at the same time. If both of their statements is an operation that changes the database’s state, this can create erroneous results.

Improving Query Readability with Common Table Expressions

What is a Common Table Expression, or CTE? Where do you use them, and why? This post answers your questions. Simply put, Common Table Expressions (also known as WITH clauses) are essentially named subqueries. They also provide additional features like recursion. If you’re new to subqueries, I recommend you read the SQL Subqueries article before continuing. The main purpose of Common Table Expressions is to improve the design and readability of an SQL statement.

SQL’s Role in Application Development

You’ve know about using SQL with databases. How does SQL fit in with app development? In this post, we look at the app development process, how it intersects with modeling a database, and what developers can do with SQL outside of their app. Obviously, the beginning of this process is defining your app — what it does, who it is for, how it will function and look, etc. Let’s say you’ve done that work already and you’re preparing to start the more detailed stuff.

Getting the Hang of the GROUP BY Clause

GROUP BY is an important part of the SQL SELECT statement. But new SQL coders can run into some problems when this clause is used incorrectly. Here’s how to avoid those issues. You’re learning SQL. You know how to SELECT some data FROM a table and how to filter the data with a WHERE clause. You can process the data using aggregate functions (MIN, MAX, SUM, AVG, and others). But when you’re dealing with a lot of data, you may need to narrow it down even more.