17 Jul 2020 Dorota Wdzięczna The LAG Function and the LEAD Function in SQL LAG() and LEAD() are positional functions. A positional function is a type of window function. If you are not familiar with when and how to use them, what the syntax of each function is, why you might want to use them, and what the differences are, read on! LAG() and LEAD() are positional functions. These are window functions and are very useful in creating reports, because they can refer to data from rows above or below the current row. Read more 24 Jun 2020 Dorota Wdzięczna Comparing TRUNCATE TABLE, DELETE, and DROP TABLE in SQL What’s the difference between truncating, deleting, and dropping a table in SQL? Find out in this article. There are a lot of ways to delete data in SQL, including the DELETE, TRUNCATE TABLE and DROP TABLE commands. Which one should you use in a given situation? In this article, you’ll learn the syntax of each command in different database engines like MySQL, PostgreSQL, SQL Server, and Oracle. And you’ll understand the DROP TABLE vs. Read more 10 Jun 2020 Dorota Wdzięczna Monthly SQL Challenges SQL learners sometimes need challenges. Do you want to test your problem-solving skills or your knowledge of SQL? Then take our monthly SQL Challenges! We prepare them on LearnSQL.com every month. Each Challenge relates to a different interesting topic and will help you keep your SQL game sharp. In this article, you'll discover what our LearnSQL.com Monthly Challenges are and where to find them. We’ll also look at the Challenges collected in our Monthly SQL Challenge Mini Track. Read more 28 May 2020 Dorota Wdzięczna Subquery vs. JOIN One of the challenges in writing SQL queries is choosing whether to use a subquery or a JOIN. There are many situations in which a JOIN is the better solution, and there are others where a subquery is better. Let’s consider this topic in detail. Subqueries are used in complex SQL queries. Usually, there is a main outer query and one or more subqueries nested within the outer query. Read more 15 May 2020 Dorota Wdzięczna Overview of Ranking Functions in SQL SQL ranking functions make working with relational databases easier, especially for data analysts, marketers, and financial specialists. These functions are used to assign a ranking number for each record and allow you to efficiently create useful reports. SQL ranking functions are window functions. Window functions compute the result based on a set of rows. The word “window” refers to this set of rows. Let’s look at the syntax of ranking functions: Read more 6 May 2020 Dorota Wdzięczna Advanced SQL Courses for Data Analysts – A Complete Review Updated on: May 20, 2024 Even data analysts who already know SQL need to keep their skills sharp. Where can you find the best advanced SQL courses for data analysts? Check out our review of the top online sources! If you're like me, constantly looking to keep those SQL skills in tip-top shape, you might be wondering where to find the best advanced courses tailored for data analysts. Well, I've got you covered! Read more 5 May 2020 Dorota Wdzięczna You Want to Learn SQL? You've Come to the Right Place! It is difficult to list all the benefits of learning SQL. You will work faster and more efficiently with a database, you will no longer be dependent on the IT department, and you will be able to analyze the data yourself and draw appropriate conclusions, among others. Add reporting to this, and you will get a very wide range of cool and useful skills. Maybe you want to change jobs or get a promotion? Read more 28 Apr 2020 Dorota Wdzięczna What Is a SQL Running Total and How Do You Compute It? The SQL running total is a very common pattern, used frequently in finance and in trend analysis. In this article, you’ll learn what a running total is and how to write a SQL query to compute it. The best way to learn SQL is through practice. LearnSQL.com offers over 30 interactive SQL courses at various level of difficulty. Each course is interactive: there is a little bit of reading, followed by an exercise to practice what you've just read. Read more 3 Apr 2020 Dorota Wdzięczna SQL Cookbook with Recipes for Success The internet holds a lot of information and can provide solutions to various problems. SQL users, both beginners and advanced, often turn to the internet for help with SQL queries. This article will help you find the right SQL queries to solve your problems. Learn what the SQL Cookbook is and why you should use it. You will also find a list of the most important recipes, from which you will prepare a great SQL dish with the taste of success. Read more 11 Sep 2019 Dorota Wdzięczna The Most Important SQL Queries for Beginners How do you get data from a table? How do you create or delete a table? How do you display distinct records? How do you select rows which store a specific value in a column? You can easily do all of this by writing basic SQL queries. This guide discusses the 30 most important SQL queries for beginners. Let's take a look. 1. Retrieving Data From All Columns This is a very basic query to display all data from a table. Read more «« « 1 2 3 4 » »»