21 Sep 2023 Tihomir Babic What Is FULL JOIN in SQL? An Explanation with 4 Examples What is FULL JOIN – one of the often neglected SQL join types? In this article, we’ll show you how useful FULL JOIN can be and teach you how to apply it to different scenarios. The four examples cover some of the typical uses. An SQL join is a construction for combining data from two or more tables. FULL JOIN is one of the types of joins. You’ll get the most from this article if you’re already familiar with SQL joins and how they work. Read more 5 Sep 2023 Tihomir Babic SQL Joins: 12 Practice Questions with Detailed Answers In this article, we dig into our SQL JOINS course and give you 12 join exercises to solve. But don’t worry – all the exercises have solutions and explanations. If you get stuck, help is there! This is, after all, made for practicing and learning. SQL joins can be tricky. It’s not just the syntax, but also knowing what joins to use in what scenarios. Joins are used when combining data from two or more tables in SQL. Read more 17 Aug 2023 Tihomir Babic 20 Basic SQL Query Examples for Beginners These 20 basic queries are a must in a starter pack for every SQL beginner. These examples will get you going on your journey to mastering SQL. You’ve set your mind on learning SQL, googled ‘basic sql query examples’ or something similar, and here you are staring at this article. Now what? All learning starts with the basics, so let’s start with the most basic question: What Is SQL? Read more 25 Jul 2023 Tihomir Babic Using GROUP BY and ORDER BY Together: A Guide Untangling how to use two basic SQL clauses – GROUP BY and ORDER BY – in one query. GROUP BY and ORDER BY are basic SQL clauses. As such, they are taught relatively early in the learning process. And they usually don’t present a big hurdle to beginners. However, using GROUP BY and ORDER BY together can be confusing. By the end of this article, your confusion on this subject will go away. Read more 20 Jul 2023 Tihomir Babic A Complete Guide to Working With Substrings in SQL In this article, we’ll discuss how to work with substrings in SQL. It involves learning several approaches, so we’ll show you their ins and outs. To work with substrings in SQL, we first need to know what a string is. In programming, a string is any kind of textual data (a title, a description, a name). A string consists of any number and type of characters. In a SQL database, strings are typically stored as CHAR or VARCHAR data types. Read more 20 Jun 2023 Tihomir Babic What Is a LEFT OUTER JOIN in SQL? 4 Practical Examples Today’s article will discuss the LEFT OUTER JOIN in SQL. We’ll go through several examples of LEFT OUTER JOIN usage and compare it with INNER JOIN. A JOIN is an SQL feature that allows you to combine data from two or more tables. The nature of relational databases makes JOIN one of the most commonly used features in SQL. Why? In practice, you’ll very seldom have all the required data in one table. Read more 27 Apr 2023 Tihomir Babic How to Use the SQL RANK OVER (PARTITION BY) Ranking data in SQL is a breeze if you know how to use RANK() to rank over a partition. This article shows you how to do it, as well as how RANK() differs from DENSE_RANK() and ROW_NUMBER(). If you work with SQL in a professional setting, you have had to rank data at least once. Think of ranking months/years/quarters by revenue or costs, best-selling products, most viewed posts or streamed songs, employees by salary, most profitable branches, you name it. Read more 18 Apr 2023 Tihomir Babic 10 Beginner SQL Practice Exercises With Solutions Solve these ten SQL practice problems and test where you stand with your SQL knowledge! This article is all about SQL practice. It’s the best way to learn SQL. We show you ten SQL practice exercises where you need to apply essential SQL concepts. If you’re an SQL rookie, no need to worry – these examples are for beginners. Use them as a practice or a way to learn new SQL concepts. Read more 28 Mar 2023 Tihomir Babic How to Solve the “must appear in the GROUP BY clause or be used in an aggregate function” Error in PostgreSQL Learn what causes one of the most common PostgreSQL GROUP BY errors and how you can fix it! As a PostgreSQL user, you surely encounter many error messages when writing an SQL code. Sometimes they are quite unclear, but you won’t need an interpreter for this one: “must appear in the GROUP BY clause or be used in an aggregate function”. This error message mentions GROUP BY and aggregate functions. Read more 16 Mar 2023 Tihomir Babic The SQL COUNT() Function: A Detailed Guide Updated on: April 22, 2024 This guide will give you a detailed explanation (with examples) of all the typical uses of the COUNT() function. Exercises included! The COUNT() function in SQL is one of the most commonly used aggregate functions. Aggregate functions in SQL are used to calculate statistics for a group of rows: counting the number of rows in each group, computing the sum of values in a group, finding the minimum or maximum value in a group, and so on. Read more «« « 1 2 3 … 9 » »»