3 Oct 2024 Jakub Romanowski 5 Reasons You Shouldn't Become a Data Analyst Data analysis is growing but it’s not for everyone. Before you become a data analyst, you need to be aware of the challenges. While it’s a great career, it requires specific skills and temperament. In this post, I’ll outline 5 reasons why being a data analyst may not be for you. Before we explore why becoming a data analyst may not suit everyone, it's important to highlight how rewarding this career can be. Read more 1 Oct 2024 Jakub Romanowski Free Course of the Month: Blog & Traffic Data Updated on: October 1, 2024 Why practice SQL with real-life scenarios? We'll explain in this article – and we’ll show how you can do it for free during October 2024 with this LearnSQL.com course! SQL is the backbone of many data-driven applications and businesses. It's a powerful language that allows you to interact with databases, retrieve data, and make insightful decisions. If you're looking to improve your SQL skills, our Basic SQL Practice: Blog & Traffic Data course is the perfect opportunity. Read more 1 Oct 2024 Gustavo du Mortier CTE vs. Temporary Table: What’s the Difference? SQL offers you two options to handle complex queries efficiently: CTEs and temporary tables. Read on to weigh the pros and cons of CTEs vs. temp tables. In SQL (Structured Query Language), a common table expression (CTE) lets you define a subquery and assign a name to it so that it can be used within a main query. A temporary table is a database table that you create explicitly, like any other table – but with the particularity that it disappears when you close the database connection in which it was created. Read more 24 Sep 2024 Gustavo du Mortier Rolling Total in SQL: What It Is and How to Compute It Calculating a rolling total in SQL is simple when you use window functions. These handy metrics are similar to running totals and moving averages, and they’ll help you build a clear picture of your data. In this article, we'll explain and explore rolling totals. In SQL, a rolling total is an important metric that helps you see how trends change over time, giving a clear picture of your data. It calculates a sum over a " Read more 19 Sep 2024 Tihomir Babic SQL Basics: The Complete Resource List If you want to work with data, you have to start by learning the SQL basics! In this article, you’ll get an overview of core SQL concepts and syntax. Plus, we include links to great resources if you want to learn more! Structured Query Language, or SQL, is a programming language that first appeared in 1974. It is designed for managing data in relational databases, which means storing, changing, deleting, and querying the data inside the database. Read more 1 Sep 2024 LearnSQL.com Team Free Course of the Month – SQL Practice Set in PostgreSQL Updated on: September 1, 2024 Do you know the basics of PostgreSQL but still need some practice? Look no further! Here is a great interactive course, SQL Practice Set in PostgreSQL. Throughout the month of September, you have access to it for FREE! We at LearnSQL.com believe that to learn a new skill, you need basic theoretical knowledge and, above all, a lot of practice. It's the same with writing PostgreSQL queries – you need a lot of PostgreSQL practice. Read more 1 Aug 2024 Jakub Romanowski Free Course of the Month – GROUP BY Extensions in PostgreSQL Updated on: August 1, 2024 Do you work with data? Want to be able to create better and more sophisticated SQL reports? Then check out our interactive GROUP BY Extensions in PostgreSQL course. In August 2024, you can complete this online PostgreSQL course for FREE! How can you get this free SQL course in August 2024? Create a free LearnSQL.com account or log in if you already have one. Read more 26 Jul 2024 Jakub Romanowski 2024 Database Trends: Is SQL Still the King? Want to know what database is most popular in 2024? In this article, I go through the 2024 Stack Overflow Developer Survey results. You’ll see why SQL is still top, PostgreSQL is on the rise and more developers are interested in SQLite. We’ll also talk about the benefits of learning SQL online, recommend resources, and how developers code outside of work for fun and professional growth. The annual Stack Overflow Developer Survey offers invaluable insights into the developer community, shedding light on trends, preferences, and emerging technologies. Read more 9 Jul 2024 Maria Durkin SQL vs. MySQL: What’s the Difference? Are SQL and MySQL the same thing? In this beginner-friendly guide, we'll explain the ddifferences of SQL and MySQL – and how they fit into the larger picture of relational database management systems. When you’re getting started with databases, it’s easy to feel overwhelmed by the terminology. SQL, MySQL, other acronyms… It can be a lot. And sometimes – like SQL and MySQL – the terminology can seem more similar than different. Read more 1 Jul 2024 Jakub Romanowski Free Course of the Month – PostgreSQL JOINs Our PostgreSQL JOINs course will help you consolidate your knowledge of working with data from two or more tables in a PostgreSQL database. Throughout the month of July 2024, this awesome SQL course is absolutely FREE! Wondering why we want to give you this SQL course for free? We've been doing this for a long time. Every month, we choose one of our interactive online SQL courses and give users free access to it. Read more 13 May 2024 Agnieszka Kozubek-Krycuń SQL FIRST_VALUE Function Discover the power of the FIRST_VALUE function, a window function that returns the first value in an ordered partition of the result set. This function is useful for anyone doing data analysis in SQL. Window functions are a powerful category of functions that enable doing sophisticated data analysis in SQL. These functions operate over a "window" of rows related to the current row, allowing for preparing complex reports like running totals, moving averages, preparing rankings, and others. Read more 29 Apr 2024 LearnSQL.com Team 10 Correlated Subquery Exercises with Solutions Correlated subqueries are a powerful SQL feature essential for advanced data analysis. This article provides 10 practical exercises to help you master correlated subqueries. SQL is a fundamental skill for anyone working with data, whether as a data analyst, a SQL developer, a data engineer, or any other related profession. Mastering SQL involves more than just understanding the basics. It also requires learning advanced SQL features, such as subqueries. Read more 23 Apr 2024 Agnieszka Kozubek-Krycuń SQL LEAD Function Get to know the SQL LEAD function, an important function to know for anyone working with SQL in data analysis. Learn through examples how to use this function in practice. The SQL LEAD function is a very important and useful SQL window function. SQL window functions are essential for doing efficient data analysis. They allow you to work with groups of rows and single rows at the same time. They make writing complex reports easier. Read more 19 Apr 2024 Jakub Romanowski SQL Track of the Season: SQL from A to Z in MySQL Do you feel the spring already? Everything is in full bloom at this time of the year. Why shouldn’t it be the same with your career? You just need to water it with a new skill. Here is the brilliant SQL from A to Z in MySQL track, our Track of the Season. In this article, I answer common questions about this awesome set of online MySQL courses. Why should you care about relational databases at all? Read more 19 Apr 2024 Jakub Romanowski Enhancing Decision-Making with SQL If you’ve ever felt overwhelmed by inefficient workflows, there’s hope. In this article, I'll show you how smart decision-making with SQL can boost your career. You will explore practical SQL strategies that go beyond organizing data, and fundamentally transforming decision-making in your company. Are you a business professional keen on boosting your data management skills? Well, SQL—or Structured Query Language—might just be your ticket to greater efficiency. It’s a robust tool that can transform the way you interact with data. Read more 16 Apr 2024 Agnieszka Kozubek-Krycuń SQL MAX Function Learn about the SQL MAX function, which is used to find the highest value in your dataset. This article explains how to use the syntax of MAX function and shows typical usage examples. The SQL MAX function is an aggregate function that returns the maximum value in a column. MAX function, together with its counterpart MIN function, is useful for summarizing data in data analysis. It can help you to compute the range of values in a dataset. Read more 1 Mar 2024 Jakub Romanowski Free Course of the Month: PostgreSQL Window Functions Are you looking for the best way to master SQL window functions? Throughout March 2024, you can access the interactive course Window Functions in PostgreSQL for free. Boost your skills at no cost. Hurry, time is running out! Need a free PostgreSQL course on window functions? You've come to the right place! If you are reading this article, you probably know PostgreSQL is one of the most popular databases in the world. Read more 27 Feb 2024 Ignacio L. Bisso 6 Examples of NTILE() Function in SQL The SQL NTILE() function can greatly simplify your data analysis and reporting. Follow these six examples to learn what it is and when to use it. Window functions are very useful, providing great expressive power to SQL. In this article, we discuss the NTILE() function, which allows us to divide a set of records into subsets of approximately equal size. This function is widely used in financial or economic calculations. Read more 21 Feb 2024 LearnSQL.com Team 4th Anniversary of LearnSQL.com Time runs so fast. This week, we celebrate the 4th anniversary of LearnSQL.com. We have come a long way together and we promise to get even better in the upcoming year! Thank you for being with us. 1459 days have passed since February 23, 2020, when we launched the LearnSQL.com platform. That's 35,016 hours, or 2,100,960 minutes, if you prefer. It's been a long time, but it feels like yesterday that we started out together. Read more 8 Feb 2024 Tihomir Babic 9 Practical Examples of SQL LEFT JOIN LEFT JOIN is one of SQL's most common JOINs. Make sure you know all its ins and outs by going through all nine of our real-life LEFT JOIN examples. LEFT JOIN – alongside INNER JOIN – is one of the essential SQL tools you need to work with data from two or more tables. But how and when should you use it? These nine LEFT JOIN examples will point the way. Read more 1 Feb 2024 Jakub Romanowski Free Course of the Month – Common Functions in PostgreSQL Do you want to be able to use popular PostgreSQL functions and process different types of data more easily? You've come to the right place! Here is the Common Functions in PostgreSQL course. Throughout the month of February, this SQL course is absolutely FREE! You are probably wondering why LearnSQL.com is offering a free SQL course. Well, we've been doing this for a long time. We choose one of our courses every month and give users free access to it. Read more 31 Jan 2024 Maria Durkin This Advanced SQL Course Will Boost Your Career! Can you already create pretty good SQL reports? Do you want to take it a step further? In this article, I'll explain how an advanced SQL course can propel you (and your career) to the next level. Since you are looking for information about SQL, you probably already know how important data is nowadays. Very few companies can stay on the market without using the power of data or basing their strategic decisions on it. Read more 18 Dec 2023 Ignacio L. Bisso Can You Use Multiple WITH Statements in SQL? A comprehensive guide to multiple WITH statements in SQL, perfect for beginners and experts alike. The SQL WITH clause allows you to define a CTE (common table expression). A CTE is like a table that is populated during query execution. You can use multiple WITH statements in one SQL query to define multiple CTEs. In this article, we will explain how to define multiple CTEs in a single query. Read more 28 Nov 2023 Tihomir Babic What Are SQL Window Functions? Need to up your data analysis game? Learn these SQL window functions here and you’ll take your analysis skills to the next level. Practice exercises and detailed explanations included! When I first heard about SQL window functions, I thought it was some strange marriage between SQL and Windows. I was wrong. The SQL window functions have nothing to do with that famous operating system. They are SQL functions that do computations on the set of rows related to the current row. Read more 14 Nov 2023 Jakub Romanowski SQL for Human Resources Data is just as important in Human Resources as it is in other business areas. That makes SQL for HR more than just a tool; it's a game-changer. Let's dive into this transformative journey together. In the modern business world, data has become a cornerstone. It drives decisions, shapes strategies, and offers insights that were previously out of reach. Every corner of an organization, every department, is tapping into the potential of data to enhance its operations. Read more 31 Oct 2023 Jakub Romanowski Why Learn SQL? In a world overflowing with data, SQL is the key to making sense of it all. It's the bridge between raw numbers and meaningful insights. In this article, I'll explore SQL’s unmatched value in our data-centric era. Let's answer the question: "Why learn SQL?" Every day, businesses and individuals generate and interact with vast amounts of data, seeking insights and solutions. Amidst this data-driven environment, a pressing question arises: Why learn SQL? Read more 12 Oct 2023 Dominika Florczykowska What Does ORDER BY 1 Mean in SQL? Have you ever seen the "ORDER BY 1" syntax in SQL queries and wondered what it means? In this article, we'll explore this syntax, clarify its purpose, and make it easier to grasp. Whether you're an experienced SQL user or just starting to explore this language, you've likely encountered the ORDER BY clause before. In SQL, the ORDER BY clause is used to sort the rows in a table based on one or more columns. Read more 5 Oct 2023 Jill Thornhill BigQuery Window Functions Explained Keeping up with data analysis trends gives your organization – and your CV – the cutting edge. In this article, we'll look at BigQuery window functions and how you can use them to gain deeper insights into your data. Google's BigQuery, launched in 2010, is gaining traction as a popular choice with organizations needing to analyze large quantities of information quickly and to compare their own data against statistical data in the public domain. Read more 19 Sep 2023 Alexandre Bruffa Python vs. SQL for Data Analysis You surely have heard about SQL and Python. Maybe you’ve even worked with one of those languages. Both have strengths and weaknesses. When it comes to data analysis, which should you use? This article will demonstrate how Python and SQL are useful for data analysis and how knowing both languages can boost your data analysis journey. Decided to get into data analytics? Great! An increasing number of companies are looking for people who can analyze data and draw conclusions from it. Read more 7 Sep 2023 Ignacio L. Bisso COUNT OVER PARTITION BY: An Explanation with 3 Examples In SQL, combining the COUNT() function with the OVER() clause and PARTITION BY opens the door to a totally different way to count rows. In this article, you’ll learn how to do several COUNTs in a single query and calculate expressions based on the result of the COUNT function. In this article, we will cover how you can use the COUNT() function combined with the clauses OVER() and PARTITION BY. Read more 31 Aug 2023 Jakub Romanowski How SQL Helps the Healthcare Sector Why does the healthcare industry need SQL? Find out how you can use SQL for healthcare in this article. The digital age has ushered in a new era where data is at the heart of every industry. From finance to retail, data drives decision-making and strategy, shaping the way businesses operate and grow. The healthcare sector, with its vast and complex data sets, is no exception to this trend. The rise of digital health records, patient databases, and common integration of hospital inventory management software has underscored the importance of efficient data management in healthcare. Read more 29 Aug 2023 Maria Durkin How AI & SQL Can Accelerate Your Data Analysis Workflow Did you know that using AI for data analysis can be a total game changer for SQL developers and data analysts? In this article, we’ll learn about how AI can help you level up your data analysis skills and why it’s a must-have tool in every data professional’s toolkit. Artificial Intelligence (AI) has emerged as a game-changer in the workforce, transforming industries and redefining how professionals deal with data. Specifically, the use of AI for data analysis is becoming increasingly critical in making informed decisions. Read more 25 Aug 2023 LearnSQL.com Team SQL for Data Analysis Cheat Sheet Welcome to our SQL for Data Analysis Cheat Sheet — a must-have resource for anyone looking to harness the power of SQL in the realm of data analysis. Whether you're a data enthusiast, a business analyst, or a seasoned data professional, this cheat sheet is designed to empower you to extract valuable insights from your datasets. Inside, you'll find a carefully curated collection of SQL commands and tips that will elevate your data analysis game. Read more 24 Aug 2023 Kamila Ostrowska New Feature: Notebook to Boost Your SQL Learning You want to learn SQL effectively but you keep forgetting queries? Now you can use LearnSQL.com’s new notebook feature in all our courses! This new tool will help you memorize and recall content. I remember when I first started to learn SQL. I was moving quite smoothly through most of the lessons, taking a lot of notes in my paper notebook. (I have a lot of old school paper notebooks). Read more 22 Aug 2023 Nicole Darnley How to Prepare for an Advanced SQL Interview Tips and tricks to help you ace even the most advanced SQL interview questions. SQL has become the lingua franca of data – the standard method for interacting with databases, extracting insights, and conducting analytical tasks. As a data analyst, the ability to understand and manipulate SQL code is not just a 'nice to have'; it's an absolute necessity. For many data analyst roles, a basic understanding of SQL isn't enough. 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 10 Aug 2023 Martyna Sławińska Advanced SQL Practice: 10 Exercises with Solutions As SQL proficiency continues to be in high demand for data professionals and developers alike, the importance of hands-on practice cannot be emphasized enough. Read on to delve into the world of advanced SQL and engage in practical exercises to enhance your skills. This article provides you with a collection of ten challenging SQL practice exercises specifically for those seeking to enhance their advanced SQL skills. The exercises cover a selection of SQL concepts and will help you refresh your advanced SQL knowledge. Read more 8 Aug 2023 Dominika Florczykowska What Does GROUP BY 1 and GROUP BY 1, 2, 3 Mean in SQL? Have you ever come across the unfamiliar GROUP BY 1 syntax in SQL queries and wondered what it's all about? Well, you're not alone! In this article, we'll dive into this syntax, explain its purpose, and make it easier to understand. Whether you are a regular SQL user or you’re just beginning to learn this language, you have probably worked with GROUP BY before. The GROUP BY clause in SQL is used to group rows from a table based on one or more columns. Read more 3 Aug 2023 Jakub Romanowski Best SQL Books for Data Analysis In the world of data analysis, SQL is a powerful tool. It's a language that helps professionals find, organize, and analyze the data stored in databases. If you're looking to learn this important skill, you've come to the right place. This article will guide you through the best SQL books for data analysis, whether you're just starting out or already have some experience. SQL (Structured Query Language) is a standard language used for working with databases. Read more 1 Aug 2023 Jakub Romanowski Free Course of the Month – Window Functions Practice Set Do you want to enhance your SQL skills and learn how to prepare complex SQL reports? Maybe you've learned SQL window functions but need a refresher. This month, our unique SQL course Window Functions Practice Set is completely free! You're probably wondering ‘What's the catch?’. Why do we give something for free to our users? Well... we want to support people like you who are constantly striving to be better. Read more 1 Aug 2023 Ignacio L. Bisso CTE in T-SQL: A Beginner’s Guide with 7 Examples A common table expression (CTE) is a powerful T-SQL feature that simplifies query creation in SQL Server. CTEs work as virtual tables (with records and columns) that are created on the fly during the execution of a query. They are consumed by the query and destroyed after the query executes. In some cases – like when the query expects data in a specific format and the source tables have the data in another format – a CTE can act as a bridge to transform the data in the source tables to the format expected by the query. Read more 26 Jul 2023 Jakub Romanowski The Best Way to Learn SQL: A Complete Guide for Beginners If you've ever wondered about the best way to learn SQL, you're in the right place. Whether you're a complete beginner or an experienced professional looking to upskill, this comprehensive guide will show you the way. In today's data-driven world, you can think of data as a treasure chest full of gold. And SQL (Structured Query Language) is your personal key to unlocking it. SQL is a potent tool that allows you to communicate with databases, enabling you to extract, shape, and make sense of data. 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 18 Jul 2023 Maria Durkin SQL for Data Analysis: What Should I Learn? You may already be aware of SQL's importance in data analytics. But what features of SQL are important to data analysis and where can you learn them? In this article, we will answer your questions. Before we talk about using SQL for data analysis, it helps to know what we’re talking about. So, let’s define these two things. Structured Query Language (SQL) is a programming language that is used to manage data in relational databases. Read more 11 Jul 2023 Maria Durkin How to Master SQL You've heard SQL is a must-have skill for furthering your career. You want to learn it. In this article, we look at why it is so beneficial to master SQL and how you can reach that level of mastery. Master SQL, and unlock the power of relational databases, the most used databases for managing structured data. But what makes SQL so important? SQL, or Structured Query Language, is a must-have skill for anybody navigating today's data-driven world. Read more 6 Jul 2023 Jill Thornhill Google BigQuery SQL Syntax: A Comprehensive Guide What is Google BigQuery? What can it do for your organization? Is BigQuery SQL a valuable skill? Where can you learn it, and where can you get some practice? Very few organizations today are not computerized. Many processes now make use of the IoT (Internet of Things), where all kinds of devices are networked and continually feed real time data into computer systems. The result is a vast amount of data available for decision-making. Read more 5 Jul 2023 Jakub Romanowski Our New Interactive Course – SQL Practice: University Are you a beginner looking for a hands-on online SQL course to solidify your skills? Or perhaps you're an SQL learner hungry for real-world applications of your new skills? LearnSQL.com, has crafted a robust practice-based learning experience to help you advance at your own pace. Here is SQL Practice: University! In today's data-driven world, mastering SQL is more than just a useful skill—it's a powerful tool that can open doors to many career opportunities. Read more 4 Jul 2023 Nicole Darnley How E-Commerce Businesses Can Benefit From SQL Learn how SQL for e-commerce can empower your online business. When we talk about business in the modern age, the phrase "knowledge is power" takes on a whole new dimension. In the world of e-commerce, the real power lies in the ability to leverage data; one of the key tools in the arsenal of data management and analysis is SQL. SQL, or Structured Query Language, is essential for e-commerce businesses looking to extract valuable insights from their vast reserves of data. Read more 1 Jul 2023 Jakub Romanowski Free Course of the Month: Write Functions in PostgreSQL Why learn to write user-defined functions? I’ll explain in this article – and how you can learn for free during July 2023 with this LearnSQL.com PostgreSQL course! PostgreSQL is one of the most popular databases in the world. This is mainly due to its great functionality and the fact that it’s open source (i.e. free!). Postgres is fast, it runs on multiple systems, and it’s suitable for almost any application. Read more 29 Jun 2023 Radu Gheorghiu How to Use COUNT() with GROUP BY: 5 Practical Examples Using the COUNT() function with GROUP BY is one of the most common SQL constructs in aggregate queries. Read this article to find out how to use COUNT() with GROUP BY correctly using 5 examples. In this article, we will explain the importance of using COUNT with GROUP BY. We’ll talk about why it is essential in SQL and how it enables data analysis and summarization based on specific criteria. Read more 22 Jun 2023 Maria Durkin 7 Reasons Why AI Won't Replace SQL Developers So you've heard all about AI and the famous ChatGPT. And you're wondering if these tools would be beneficial or detrimental to your profession. In this article, we will put your fears to rest and explain how SQL and AI can work together and make developers’ jobs easier. Let's start with an explanation of what Artificial Intelligence (AI) is. AI is an area of computer science concerned with creating machines capable of performing activities that would normally need human intelligence. 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 15 Jun 2023 Dominika Florczykowska An Overview of MySQL Window Functions MySQL window functions are very helpful when you want to create meaningful reports with SQL. In this article, we’ll demonstrate the most common window functions in MySQL and explain how to use them. MySQL 8.0 introduced a new feature: window functions. These functions are very useful to data analysts and anyone who creates reports using MySQL. Using them, you can easily compute moving averages, cumulative sums, and other calculations over specified subsets of your data. Read more 13 Jun 2023 Maria Durkin Who Is a Data Manager? Who are data managers? What are their responsibilities, and how do I become one? We’ll answer these questions and get you on your way to becoming a data manager! Simply put, data managers oversee the management of information or data within an organization. They manage data organization, storage, security, and accessibility, and they collaborate with other team members to guarantee data accuracy and usefulness in supporting decision-making. To ensure that data is effectively managed and used appropriately, they may also develop and implement policies and procedures pertaining to data management. Read more 8 Jun 2023 Alexandre Bruffa Boost Data Potential wht SQL and Python In this article, we will explain why using SQL with Python is an awesome combination for unleashing the full potential of your data! Read on to find out how learning and starting to use the most popular programming language can have a positive impact on your work. You may be wondering why we write about Python on the LearnSQL.com blog? Well ... They are just a very good couple. Both languages are basic tools in such fields as data science and data visualization. Read more 6 Jun 2023 Martyna Sławińska How to Use SUM() with OVER(PARTITION BY) in SQL Discover real-world use cases of the SUM() function with OVER(PARTITION BY) clause. Learn the syntax and check out 5 different examples. We use SQL window functions to perform operations on groups of data. These operations include the mathematical functions SUM(), COUNT(), AVG(), and more. Typically, you use SUM() function with GROUP BY. In this article, we will explain what SUM() with OVER(PARTITION BY) does in SQL. We’ll show you the most common use cases in real-world applications to determine the ratio of the individual row value to the total value, calculate running totals, and find a custom order total that includes discounts for certain products. Read more 1 Jun 2023 Nicole Darnley Why Do You Need SQL to Work With Google BigQuery? Data is just as important to your business as investing or accounting; that’s why many people use Google’s BigQuery data warehouse. In this article, we'll discuss why you should learn SQL if you want to start using BigQuery. Unleash the power of your data! In the ever-growing landscape of data-driven decisions, organizations are continuously on the lookout for tools that can help them handle and analyze their data efficiently. Enter Google BigQuery: a powerful, Cloud-based data warehouse designed to store and analyze massive datasets in record time. Read more 1 Jun 2023 Jakub Romanowski Course of the Month: INSERT, UPDATE, and DELETE in PostgreSQL Do you want to be a data engineer or data analyst? Do you work with databases daily and need to expand your skills with the basics of data manipulation? You've come to the right place. For June 2023, our SQL course of the month is PostgreSQL INSERT, UPDATE, and DELETE Commands! Learn SQL for FREE! How do you get this free PostgreSQL course in June? Create a free LearnSQL. Read more 30 May 2023 Gustavo du Mortier How to Use SUM() with GROUP BY: A Guide with 8 Examples Explore some real-world examples of using SUM() and GROUP BY in SQL, from the most basic to the most sophisticated. SUM() is a SQL aggregate function that computes the sum of the given values. GROUP BY is a SQL clause that partitions rows into groups and computes a stated aggregate function for each group. Using these two functions together, you can compute total sums for a group of rows. In this article, we’ll see 8 different examples of how you can combine SUM() and GROUP BY to create many different reports. Read more 25 May 2023 Maria Durkin The Best Database Books You Should Read Now Updated on: April 26, 2024 So, you're interested in databases and looking for some database book recommendations. In this article, we’ll take a look at our top database book recommendations to feed your brain. In essence, databases are like digital filing cabinets. They have the ability to organize, store, and retrieve data. Large amounts of data are stored, managed, and made easily accessible by using databases. Additionally, databases make it possible for data to be organized into tables, which makes searching and sorting easier. Read more 18 May 2023 Kamila Ostrowska How to Learn SQL Without Any Programming Knowledge If you think that learning SQL is only for programmers, you are deeply wrong. This skill is totally within your grasp! SQL is not just popular and in demand; it’s also quite easy and intuitive to learn. Read on to find out more! You’re searching for inspiration on how to start learning SQL. Maybe you want to change your job, or want to become more competitive in the job market. Read more 16 May 2023 Dmitri Vaitkun The Most Important SQL Commands In this article, we'll explore the most common SQL commands that everyone should know, including SELECT, INSERT, WHERE and more. We’ll also give examples of how to use each command. Are you ready to dive into the world of databases? SQL, or Structured Query Language, is a programming language that is designed specifically to interact with databases. It allows you to manipulate the data in databases in multiple ways – e. Read more 11 May 2023 Jill Thornhill Why Is Data a Valuable Resource for Your Business? How do you build an effective data resource and make it work for you? In this article, I'll look at why data is so important to any organization and how to make the most of your data resources. Bad decisions are almost always based on incorrect or incomplete facts. Good decisions keep your organization competitive. In a nutshell, that’s why data is such an important business resource. Ever since the dawn of civilization, our ancestors have known the value of information. Read more 9 May 2023 Maria Durkin Why SQL Is the Perfect Database Language Updated on: May 20, 2024 Which programming language should you learn if you want to work with databases? We’ll explain why SQL is the top choice! Learning a database language can be an incredibly valuable skill in today's data-driven world. But with so many options out there, it can be difficult to know where to start. In this article, we'll make a compelling case for why SQL is the ideal choice for anyone looking to dive into the world of databases. Read more 4 May 2023 Dominika Florczykowska How to Write Multiple Joins in One SQL Query Have you ever wondered how multiple joins work? Want to know how to join multiple tables in one query? Read this article to find out! If you are just beginning your SQL journey, you may have found it difficult to understand the concept of SQL JOINs, especially if you have to join more than two tables in one query. Worry not! In this article, we will explore how JOIN works and solve all its mysteries! Read more 2 May 2023 Nicole Darnley Top 7 Advanced SQL Queries for Data Analysis Explore essential advanced SQL queries for data analysis. Structured Query Language, or SQL, is an indispensable tool for data analysts. Most people pick up the language relatively quickly and can begin in-depth data analysis after just a few lessons. Because of this, many data analysts tend to stay in the beginner/intermediate level of using SQL. This level of understanding allows you to “get the job done”, but it might not be the most efficient way to write a query. Read more 28 Apr 2023 Jakub Romanowski MySQL Crash Course - An Interview With Rick Silva If you've read my articles before, you probably already know that I love reading. What's more, I also collect SQL books. It may sound weird, but I enjoy comparing different approaches and ways of writing about databases. The best ones end up in our recommended books lists, like The Best SQL Books. One of those books, MySQL Crash Course, has just been released. I was able to talk to its author, Rick Silva, and this is what he told me. 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 25 Apr 2023 Alexandre Bruffa Learn SQL in 10 Minutes Updated on: October 30th, 2023 Want to learn SQL fast? Our simple guide will teach you the essentials in just 10 minutes! Start querying data in no time. In today’s world, we use data for everything, and knowing SQL helps you understand this data better. Learning SQL means you can find and use important information in databases. Knowing SQL is an essential skill in any data-driven industry. For beginners, learning SQL is made easy with the right guide. Read more 20 Apr 2023 Jill Thornhill CTE vs. Subquery in SQL: What’s the Difference? What are Common Table Expressions (CTEs)? Are they the same as subqueries? When would you need to use CTEs? This article looks at the similarities and differences between CTE vs subquery. When I introduce a student to Common Table Expressions, their first reaction is “That’s just a subquery! Why do I need to learn that?”. Let’s answer this question by looking at what you can do with an SQL subquery and what extra advantages there are in using a CTE. 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 13 Apr 2023 Crystal Frazier How I Used SQL to Advance in My Career Updated on: April 18, 2024 SQL has become increasingly valuable in today’s job market. In this article, I will share my personal experience with SQL. I hope it will inspire you to grow in your career and achieve your own goals! A few years ago, I felt stuck in a job that I didn’t fully enjoy. Sure, there were aspects of my job that I appreciated, like building budgets, analyzing the performance of promotional programs, and watching my team grow professionally. Read more 11 Apr 2023 Nicole Darnley The Best SQL Blogs to Follow Updated on: May 15, 2024 In this article, you’ll find a list of the best SQL blogs and why they’re worth checking out. SQL (short for Structured Query Language) has been around since the 1970s. It’s still a wildly popular coding language. It is based on the idea that data can be structured and built through relations. If you’re familiar with SQL, you’ve likely heard the term “relational database.” This means that the tables of the database have pre-defined relationships between them: One field in one table will match another field in another table. Read more 6 Apr 2023 Maria Durkin Best PostgreSQL Courses for Beginners So you want to learn PostgreSQL but aren't sure how to get started? In this article, we look at some of the best online courses available on the Internet for learning PostgreSQL, so you can get started right away! What Is PostgreSQL? PostgreSQL is used in major companies such as Apple and Instagram. You may be wondering: should I learn PostgreSQL? PostgreSQL is a popular dialect of SQL, or Structured Query Language, a programming language for accessing and managing data in relational databases. Read more 4 Apr 2023 Maria Durkin How to Learn SQL in a Week Updated on: April 15, 2024 Need to learn SQL in a hurry? In this article, we’ll give you a learning path that will help you learn SQL in a week! So you want to learn SQL but don't know where to begin, how long it will take, or even if you have the time. In this article, we'll show you how you can learn SQL within a week using some resources that will get your SQL journey started in no time! Read more 1 Apr 2023 Jakub Romanowski Free Course of the Month: SQL Reports in PostgreSQL If you are looking for a course that takes your PostgreSQL skills to a completely different level, you've come to the right place. You can learn for free in April! We chose SQL Reporting in PostgreSQL for our Free SQL Course of the Month. It's just awesome – I'll tell you why. Do you want to be even better at SQL? Do you know the basics and want your SQL reports to be even more sophisticated? Read more 30 Mar 2023 Nicole Darnley How to Use CASE WHEN in GROUP BY Learn how you can combine SQL CASE WHEN and GROUP BY to create custom categories in your SQL queries. Raw data, by its very nature, is not always human readable. Many times, the data you’re querying is in its most unformatted form. Examples of this include codes for different business departments or product SKUs that represent specific products. To the naked eye, these codes mean nothing, so pulling them into a report is not helpful for the person reading them. 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 23 Mar 2023 Jill Thornhill How to Practice Advanced SQL Online with LearnSQL.com Want to go from intermediate to advanced SQL user? You’ll need to practice! Here are some ways you can practice advanced SQL online. You’ve seen how SQL helps you make data-driven decisions. Perhaps you’ve even learned some advanced features. But you’d like to become an expert—and for that, you need practice, practice, and more practice. Is it possible to get advanced SQL practice online? Taking SQL to the Next Level What is advanced SQL? Read more 21 Mar 2023 Kamila Ostrowska Best MySQL Courses for Beginners Updated on: May 4, 2024 SQL is among the most important languages when it comes to dealing with huge amounts of data. If your job includes analyzing or collecting data and you feel that an Excel file is not enough, you need to learn or develop your SQL skills. And if you learn SQL, you also need to know one of its most popular dialects - MySQL. If you've made the decision to learn SQL, you've come to the right place. 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 14 Mar 2023 Jakub Romanowski Learning SQL in Your Native Language is Finally Possible Updated on: April 21, 2024 Do you or someone you know speak English as a second language? Would you like to learn SQL online in your preferred language? Good news! Our awesome SQL courses are now available in French, Spanish, German, Italian, and Portuguese! SQL, or Structured Query Language, is a programming language used for managing and manipulating data in databases. It's an essential skill for anyone working with data, whether you're a data analyst, a software developer, or just someone who wants to understand how databases work. Read more 9 Mar 2023 Maria Durkin The Best Apps to Learn SQL Updated on: April 23, 2024 Let us guide you to the best apps for learning SQL on the go. They are designed to seamlessly integrate into your busy lifestyle – ensuring you develop your database skills anytime, anywhere. Are you eager to dive into SQL but unsure where to start? This article is your ultimate guide to the top apps for learning SQL. We include suggestions tailored for users of all levels, from beginners to advanced learners. Read more 28 Feb 2023 Ignacio L. Bisso 25 Advanced SQL Query Examples One of the best ways to learn advanced SQL is by studying example queries. In this article, we'll show 25 examples of advanced SQL queries from medium to high complexity. You can use them to refresh your knowledge of advanced SQL or to review before a SQL interview. Many of the examples in this article will be based on the following employee table. Only a few examples will be based on other tables; in these cases, the tables will be explained along with the example. Read more 23 Feb 2023 Tihomir Babic Top 27 Advanced SQL Interview Questions with Answers Where can an SQL professional find a comprehensive guide to advanced SQL interview questions? The shortest answer is: here! We selected the 27 most important SQL questions and answered them for you. Preparing for an SQL interview is not easy, especially if your job requires the knowledge of advanced SQL. This article contains the 27 most commonly asked advanced SQL interview questions and provides detailed answers and resources for further reading. Read more 21 Feb 2023 Tihomir Babic 6 Useful Examples of CTEs in SQL Server How can you use CTEs in SQL Server in your everyday professional life as a data pro? We’ll answer this question by giving you six examples. CTE is short for Common Table Expression. This is a relatively new feature in SQL Server that was made available with SQL Server 2005. A CTE is a temporary named result. This result is available only for the query that runs it. It isn’t stored, so it doesn't take up disk space. Read more 16 Feb 2023 Alexandre Bruffa How to Concatenate Two Columns in SQL – A Detailed Guide In SQL, concatenation is the operation of joining together strings, or pieces of text information. Learn how to concatenate two columns in SQL with this detailed guide. SQL concatenation is the process of combining two or more character strings, columns, or expressions into a single string. For example, the concatenation of 'Kate', ' ', and 'Smith' gives us 'Kate Smith'. Enhance your SQL skills with our interactive SQL Practice Set! Read more 14 Feb 2023 Nicole Darnley Data Cleaning in SQL Data cleaning is an important part of any data analysis. Here we’ll discuss techniques you can use to do data cleaning in SQL. I find it nearly impossible to focus on work when my desk is a mess. If it’s cluttered with paper, coffee mugs, or random toys my daughter has somehow snuck into my office, there is no chance I will be able to get anything done until my desk is back in order. Read more 9 Feb 2023 Nicole Darnley Learn SQL for Data Analysis with LearnSQL.com Updated on: December 1, 2023 Discover how to learn SQL for data analysis and start making sense of your data today. Our guide provides a clear and simple SQL learning path for data analysts, helping you query databases and analyze data with ease. Whether you're starting from scratch or looking to polish your skills, we'll help you every step of the way. When I was in high school, I planned to go to college and major in interior design. Read more 7 Feb 2023 Jill Thornhill Top SQL Certificates in 2023 SQL is an essential skill in today’s data-driven world. Looking for the best SQL certificates to further your career can be confusing. This article gives some pointers that will help you make the best choice to fit your goals. Who needs an SQL certificate? If you can write advanced SQL queries, surely you can just demonstrate your skills at the interview and you'll be hired. Yes ... but ... you won't reach the interview unless the recruiter invites you. Read more 2 Feb 2023 Valentyn Kucherenko Introducing Our New Ultimate SQL Cheat Sheet! Do you ever find yourself writing an SQL query and forgetting the syntax of some function? That sometimes happens to me too. Fortunately, LearnSQL.com has prepared this awesome Ultimate SQL Cheat Sheet you can always have on hand. Print it or save it to your browser's favorites and make your data querying more efficient! If you are looking for an SQL Cheat Sheet, it is safe to assume that you already know what SQL is. Read more 26 Jan 2023 Gustavo du Mortier How to Group by Multiple Columns in SQL When analyzing large data sets, you often create groupings and apply aggregate functions to find totals or averages. In these cases, using the GROUP BY clause with multiple columns unfolds its full potential. GROUP BY is a clause of the SELECT command. It allows you to compute various statistics for a group of rows. For example, you can use GROUP BY with an employee table to know how many employees are of each gender. Read more 24 Jan 2023 Maria Durkin SQL for the Business Analyst How can SQL benefit business analysts? In this article, we’ll discuss why SQL is a fundamental skill in this role. You’ll also learn what a business analyst does and what they need to advance their career. According to BrainStation, the already high demand for business analysts is set to grow even more. One of the driving forces behind the rising demand is the digital revolution, which has been accelerated by the recent pandemic. Read more 19 Jan 2023 Tihomir Babic What Is a CTE in SQL Server? What is a CTE, and how do you write a CTE in SQL Server? Join us on a journey where we’ll see all the typical usage of a CTE in SQL Server. CTEs (or Common Table Expressions) are an SQL feature used for defining a temporary named result. You can think of it as a temporary table whose output is available only when the main query is run. This is practical because the CTEs result isn’t stored anywhere but can always be referenced inside the query like any other table. Read more 17 Jan 2023 Jill Thornhill Is SQL Hard to Learn? Updated on: May 10, 2024 If you have no IT skills, how hard is it to learn SQL? Will it be too technical for you? Is it worth the effort? And where would you start? In this article, I will answer those questions. As an IT consultant and trainer, I've often advised people to learn SQL. And, almost as often the reply has been, "Is it hard to learn SQL? Do I need technical or IT skills to learn it? Read more 10 Jan 2023 Alexandre Bruffa Database Jobs to Choose in 2023 In this article, we will explore some of the top database jobs to choose from in 2023. So you want to land yourself a database job in 2023. It’s a great choice, and there are lots of options. Let’s talk about the most popular data-related jobs and what you need to do to get one. SQL Is Essential for a Database Job It’s important to mention that most of the popular databases nowadays are relational – i. Read more 5 Jan 2023 Nicole Darnley UNION and UNION ALL in SQL Explained In this article, we’ll explore the SQL clauses UNION and UNION ALL. Learn what they do and when to use each one. I had been an analyst for probably four years before I knew about the SQL clause UNION ALL. I used UNION on a regular basis, but had never heard of its counterpart. Then one day when I heard a coworker talking about it. I thought to myself, “What is he talking about? Read more 3 Jan 2023 Kamila Ostrowska SQL Books for Beginners How can you learn SQL more efficiently? Besides a good online course, find an interesting book to enrich your knowledge. Here are the best SQL books for beginners. SQL, or Structured Query Language, is a very powerful tool to work with many types of data. If you are interested in learning SQL you probably know how useful it is, and how widely it is needed. To learn SQL successfully, a solid online course for beginners like our SQL Basics is a great start. Read more 29 Dec 2022 Ignacio L. Bisso How to Practice SQL Subqueries Have you ever wondered what separates beginners from advanced SQL users? It includes things like, for example, subqueries. In this article, I explain their importance and why you need to practice SQL subqueries to become an expert. What Is an SQL Subquery? SQL is an easy-to-learn language. However, there are certain complex features and techniques of the language that require practice. One of these features is the subquery, which adds great expressive power to the language and your projects. Read more 27 Dec 2022 Alexandre Bruffa Learn Advanced SQL with LearnSQL.com In this article, we will propose a learning path that will cover advanced SQL topics. If you already know the basics of SQL, you probably have figured out that most online and offline SQL tutorials and courses usually cover the basic and intermediate concepts: SELECT, FROM, WHERE, ORDER BY, GROUP BY, and joining tables. Even university database courses typically don’t cover more advanced SQL topics. While this is enough SQL for most everyday tasks, there are some relatively new features that have been added to SQL in the last 20 years: window functions, recursive queries, and GROUP BY extensions (ROLLUP, CUBE, GROUPING SET). Read more 22 Dec 2022 Marko Calasan What Are DDL, DML, DQL, and DCL in SQL? We explore the separation of SQL into its four principal sublanguages and explain the meaning behind each of them. When you’re learning SQL – perhaps through LearnSQL.com’s very own comprehensive SQL Basics course – you may have come across the terms DDL, DML, DQL, and DCL. And maybe you’ve gotten confused by all the acronyms. In this article, we will explain what these terms stand for and how they correspond to sublanguages that neatly divide the SQL language into four parts that function together. Read more 20 Dec 2022 Nicole Darnley How to Use WHERE with GROUP BY in SQL In this article, we’ll discuss how to combine the WHERE and GROUP BY clauses in SQL. If you’re writing SQL on a daily basis, you will quickly realize how often both WHERE and GROUP BY clauses are used. WHERE is an essential part of most queries. It allows you to filter large datasets to only the pieces you are interested in. GROUP BY is one of the most powerful tools an analyst has when aggregating data. Read more 15 Dec 2022 Maria Durkin Want to Get a Data Engineering Job? Learn SQL! So, you want to be a data engineer, but you don't know how to get there. In this article, we’ll help you understand the skills you'll need for different types of data engineering jobs. You’ll also find some data confirming that data engineer jobs are a good career choice. Data engineering and various types of data engineer jobs have become very popular in recent years. And for good reason: Next to data science, data engineering is one of the fastest-growing branches of IT. Read more 13 Dec 2022 Tihomir Babic 5 Practical Examples of SQL’s WITH Clause These five practical use cases will make you want to use the SQL WITH clause daily. The WITH clause can help you write readable SQL queries and break complex calculations into logical steps. It was added to SQL to simplify complicated long queries. In this article, we’ll show you 5 practical examples of the WITH clause and explain how using it makes SQL queries more readable. The WITH clause is also called a Common Table Expression (CTE). Read more 8 Dec 2022 Martyna Sławińska How to Export Data From Microsoft SQL Server to a CSV File When working with data and databases, it is common to export data for further processing or transport to another database. Follow this article to learn how to export data from Microsoft SQL Server to a CSV file. In this article, we first recall what a CSV file is and why you would want to export data in this format from an MS SQL Server database. Then, we cut to the chase and export data to a CSV file using both SQL Server Management Studio (SSMS) and SQL Command Line (SQLCMD). Read more 6 Dec 2022 Jill Thornhill The Future of SQL Is it worthwhile to learn SQL? Or will a language that’s over 40 years old soon be outdated? Have relational databases been eclipsed by the advent of other database solutions like NoSQL? In this article, we answer these questions. Do you need to upgrade your IT skills? What should you learn first? The choice is daunting. If you're looking to the future, you obviously want to invest your time in something that's still widely used and will continue to be in the years to come. Read more 29 Nov 2022 Ignacio L. Bisso How to Choose Data Types for SQL Table Columns Databases store data values of various kinds. For example, you may store the name of a product as a text string, the price of a product as a number, or the date a product is sold as a date value. These values – the product name, the price, and the sale date – are stored as different data types. In this article, we explain several SQL data types with real examples. Read more 24 Nov 2022 Kamila Ostrowska The Most Popular Databases in 2024 Updated on: April 6, 2024 If you work with data – or if you want to start – you need a database that will answer your needs. Not sure what to choose? Don’t worry! In this article, you’ll find a list of today’s most popular and efficient databases, with a quick summary of what each one does. Businesses run on data. But to get the most from that data, it needs to be stored in a structured way – usually in a database. Read more 22 Nov 2022 Martyna Sławińska How to Export Data from MySQL into a CSV File A database is a primary platform for working with data and storing data. But often, you must take your data out of the database. Read on to find out how to export data from MySQL database into a CSV file. In this article, we’ll demonstrate how to export data into a CSV file. We’ll start by introducing what a CSV file is and why we use it. Then, we’ll export data from a MySQL database into a CSV file. Read more 18 Nov 2022 Alexandre Bruffa I’m a Software Developer. How Do I Learn SQL? What do you need to know about relational databases and SQL as a software developer? In this article, we’ll explain the topics you need to know and how you can acquire this knowledge. If you are a software developer, you may have noticed that SQL skills are often required in some development roles. Although you are not a database manager or a data scientist, you will need solid SQL foundations to continue your developer journey. Read more 17 Nov 2022 Luke Hande What Is an SQL Database? SQL databases have been used for decades and have grown in popularity, becoming one of the most common data management tools. They provide the user with an efficient way to store the data and an intuitive way to access or modify it. In this article, we’ll start by explaining what a database is and showing some examples. We’ll move on to how databases can be used to efficiently work with large amounts of structured data. Read more 15 Nov 2022 Himanshu Kathuria Best SQL Courses for Beginners in 2024 Updated on: July 5th, 2024 Whether you’re dreaming of a career in data analytics or just want to learn a new skill, learning SQL is worthwhile. But don’t waste your time on poorly-designed courses or other learning resources! In this article, I’ve collected the best online SQL courses for beginners. Pick one and start being awesome! SQL (Structured Query Language) has emerged as one of the top skills that recruiters look for when it comes to data related jobs. Read more 10 Nov 2022 Tihomir Babic How to Use GROUP BY in SQL In this article, we’ll give you a step-by-step guide on using GROUP BY in SQL. Uncover the nuances of the GROUP BY clause and learn different ways of using it. GROUP BY is one of the most-used clauses in SQL. It moves you from simply selecting data from the database to grouping rows with the same column values into one group. When used with SQL’s aggregate functions, you can use GROUP BY to compute metrics like counting the number of instances or finding the total, average, minimum, or maximum value. Read more 8 Nov 2022 Tihomir Babic How to Use the PARTITION BY Clause in SQL We’ll be dealing with the window functions today. Specifically, we’ll focus on the PARTITION BY clause and explain what it does. PARTITION BY is one of the clauses used in window functions. In SQL, window functions are used for organizing data into groups and calculating statistics for them. It sounds awfully familiar, doesn’t it? Even though they sound similar, window functions and GROUP BY are not the same; window functions are more like GROUP BY on steroids. Read more 3 Nov 2022 Jakub Romanowski SQL Track of the Season: SQL from A to Z in MS SQL Server Maybe your company uses MS SQL Server and you’d like to join the data analysis team. Or maybe you want to add a new skill to your CV. Either way, our SQL Track of the Season: SQL from A to Z in MS SQL Server, will help. In this article, I’ll answer common questions about this awesome set of online MS SQL Server courses. If you’re reading this blog post, you probably already know that you should start learning SQL and working with databases. Read more 27 Oct 2022 Ignacio L. Bisso What Are the Basic SQL Queries? You can access the data in a database using some basic SQL queries. In this article, we review the fundamentals SQL queries every beginner should know. Databases are everywhere, and they contain different kinds of data. Almost all of them support SQL, a language that lets you read and manipulate the data inside a database. In this article, I’ll show you the basic SQL queries that you can use to perform many common everyday data tasks. Read more 25 Oct 2022 Tihomir Babic An Overview of SQL Text Functions in PostgreSQL If you’re a PostgreSQL user and into data analysis, you’ve heard of the text functions or maybe even used them. But what are PostgreSQL’s most popular text functions? In today’s article, we’ll show you what they are and how to use them. As anyone who works with them knows, databases don’t contain only numerical values. Among other data types, databases also store text or string data. To use PostgreSQL effectively, you’ll have to know at least some of Postgres’ text functions. Read more 18 Oct 2022 Kateryna Koidan SQL Beginners: Questions to Ask Before Writing a Query SQL is known for its easy-to-follow syntax that even beginners can understand pretty quickly. Still, to write your own SQL queries, you need to know the basics. Let’s explore what things need to be considered before writing a SQL query. If you are looking for a career in data analysis or just want to work effectively and independently with data in any analytical position, you’ll need to master SQL. Luckily, this programming language is beginner-friendly and can be learned just in a few months with the right learning sources. Read more 13 Oct 2022 András Novoszáth Why You Need Analytical Skills to Get Promoted at Work Do you wonder if analytical skills might benefit you in your job? Are ‘analytical skills’ the same as data analytics? Is SQL a useful analytical skill? Read the article to answer these questions. Analytical skills allow you to better understand problems in your work; good analytical skills bring many benefits to your career. The term ‘analytical’ refers to a wide range of traits and capabilities, making it sometimes ironically vague and general. Read more 10 Oct 2022 Tihomir Babic SQL Courses for Software Testers In this article, you will learn why software testers need SQL and which courses are ideal for them to learn it. Do software testers need SQL? Oh yes, they do! They don’t necessarily use it all the time or take advantage of all its possible features. But a tool for accessing data in a database is essential for a software tester. And SQL is exactly that: a programming language designed specifically for handling data in relational databases. Read more 4 Oct 2022 Himanshu Kathuria How Much Do Business Analysts Earn? What does a business analyst do, and why are they essential to their companies’ success? What skills do you need to become a business analyst? How much can you expect to earn? We’ll answer all those questions in this article. With our dependence on digital systems increasing by the day, IT and IT related jobs like business analysts are seeing a continuous boom in opportunities. Did you know that IDC estimates around 60% of the global GDP will be mostly impacted by the introduction of digital tools by the end 2022? Read more 29 Sep 2022 Ignacio L. Bisso How the WITH Clause Works in SQL Do you want to master complex SQL queries? Learn how to use the powerful WITH clause! In SQL, there are simple queries and complex queries. A simple query can take data from a table, apply a filter, and return the data as it is in the source table. A complex query may require complex transformations to the source data or may need to read and join data from multiple tables or views. Read more 27 Sep 2022 Himanshu Kathuria SQL ORDER BY Clause with 7 Examples Get to know the SQL ORDER BY clause! Our practical and easy examples will help you understand its syntax, common uses, and best practices. SQL or Structured Query Language lets you “talk” to a database. It enables you to create, retrieve and manipulate the data in a relational database. This language has become so ubiquitous that hardly any data-related field has been untouched by it. If you’re interested in the SQL ORDER BY clause, I’m assuming you have either already started learning SQL or are planning to start it soon. Read more 22 Sep 2022 Kateryna Koidan Roadmap to Becoming a Data Analyst What is a data analyst? What are their daily duties, and what skills do they need? In this article, I discuss the role of data analysts and share a step-by-step guide on how to become one. As organizations start to realize the value of their data on their customers, target audience, competitors, suppliers, and other market players, the role of data analysts becomes more important. To become a successful data analyst who can bring real value to the organization, you need to possess a specific set of skills. Read more 15 Sep 2022 Martyna Sławińska How to Import a CSV File to a MySQL Database CSV files store and transfer data between databases. Read on to find out how easy it is to work with CSV files in a MySQL database. CSV files are one of the oldest data exchange formats and are still heavily used by IT professionals from various domains. It is common for online data resources and different database software to offer their data uploads and downloads in CSV format. In this article, we’ll briefly review what a CSV file is and how to work with it. Read more 8 Sep 2022 Tihomir Babic SQL Syntax In today’s article, we’ll give you a walkthrough of core SQL syntax with a focus on the SELECT, INSERT INTO, UPDATE, and DELETE statements. SQL is a programming language designed specifically to communicate with databases. It allows you to get the data from a database or change the data within it. Like any programming language, SQL has a syntax you must adhere to. In other words, there are rules to follow regarding its commands if you want your code to work. Read more 1 Sep 2022 Kateryna Koidan Learn SQL for Data Science With LearnSQL.com If you are interested in a data science career and have looked at a few relevant job descriptions, you've probably noticed many leading tech companies expect their data scientists to know SQL. Let's see how you can learn SQL for data science and become more valuable to any data-driven organization. A data scientist is a complex technical role that expects a combination of the skills of a statistician, a business analyst, and an IT expert. Read more 30 Aug 2022 Kateryna Koidan How to Learn SQL for Marketing Analytics With LearnSQL.com SQL is a valuable tool for any experts wanting to make data-driven decisions. Marketers are no exception. Let's explore how to design an effective learning path for SQL in marketing. SQL for marketing analytics is used to understand customers better and to increase the effectiveness of marketing campaigns. If you work in marketing and want to join other marketing experts who have already benefited from this tool, you need to learn SQL. Read more 25 Aug 2022 Lisandro Fernigrini What's New in MS SQL Server 2022 Microsoft SQL Server 2022 is almost here! In this article, we’ll review what new enhancements and features will be coming to this popular relational database. The new version of MS SQL Server will become available almost three years after SQL Server 2019 was released. (You can learn more about the origins and different versions of SQL Server in A Brief History of MS SQL Server.) If you need to start implementing a software solution, there are plenty of changes and new features in SQL Server 2022 that makes it a great option. Read more 23 Aug 2022 Kamila Ostrowska How to Learn SQL It takes quite an effort to learn SQL or any new skill for that matter. But pushing hard is not enough to learn it successfully. You can sit for hours and still feel like you're not making progress. So, what do you do? Let it go or try even harder? I say: work smart, not hard. SQL (Structured Query Language) is one of the most popular programming languages. It is an invaluable tool in a world overflowing with data. Read more 19 Aug 2022 Jakub Romanowski Summer 2022 Track of the Season: Creating Database Structure Summer is a great time to learn something new! Have you heard about data engineering? It’s one of today’s hottest skills. In this article, I'll show you why we selected our Creating Database Structures track as our SQL Track of the Season – and why it’s your ticket to a new career! LearnSQL.com offers online SQL training tracks – logically structured and well-thought-out learning paths that will help you work towards becoming an SQL expert. Read more 18 Aug 2022 Tihomir Babic An Overview of SQL Text Functions in Google BigQuery Data analysts and Google BigQuery go hand in hand. Google's cloud data warehouse presents you with plenty of opportunities for using standard SQL text functions you can't avoid in your day-to-day work as a data analyst. BigQuery uses Google Standard SQL, an ANSI-compliant SQL dialect. This means you can use standard SQL text functions in BigQuery without needing to learn a variant of a given function. The Standard SQL Functions course is an excellent resource for learning those functions. Read more 16 Aug 2022 Alexandre Bruffa PostgreSQL vs. MySQL: Is It Difficult to Switch? So you know PostgreSQL, but the boss has decided to switch to MySQL. What are the differences between these two SQL dialects? We discuss PostgreSQL vs. MySQL in this article. PostgreSQL has gained popularity in the last decade, and many developers and database specialists learned PostgreSQL as their first SQL dialect. But PostgreSQL is not the only relational database; during your IT career, you will probably be asked to use another SQL dialect – like MySQL. Read more 11 Aug 2022 Tihomir Babic How to Use Aggregate Functions in WHERE Clause Filtering data according to the result of an aggregate function is a common data analysis task. So how do you use aggregates in the WHERE clause? We’ll dedicate this whole article to answering that question. Combining aggregate functions and filtering based on their results is often used in data analysis – e.g. showing branches with total sales above X, countries where the number of posts is lower than Y, students with an average score below Z, and so on. Read more 9 Aug 2022 Dmitri Vaitkun What Is an SQL Query? An SQL query is the most basic SQL command. It is a question you ask a database. In this article, we dive into the basics of SQL queries to kickstart your SQL journey with practical knowledge right away! SQL, or Structured Query Language, is a programming language designed to interact with databases. When you want to access data in a database, be it to alter, delete, add, or simply extract information, you use SQL. Read more 4 Aug 2022 Jakub Romanowski Lesser-Known SQL YouTube Channels You Need to Follow Now! Are you learning SQL? Many beginners start with YouTube tutorials. However, popular SQL clips are not always very helpful. You need to know which ones to watch so that you don't waste your time. In this article, I discuss SQL YouTube channels that, while not the most popular, deserve your attention. Click "subscribe" and watch! Those who follow my articles on LearnSQL.com know I'm not a huge fan of learning SQL from YouTube. Read more 28 Jul 2022 Kateryna Koidan How to Set Up a Corporate SQL Training Program Are you looking to set up a business or corporate SQL training for your company's employees? In this article, we’ll discuss how to build an efficient SQL training program and why the LearnSQL.com platform is the choice of leading tech companies. If you are responsible for employees’ professional development – especially in a data-driven company – you know that SQL is essential for anyone who works with data. This programming language can enhance the performance of data and business analysts (for whom SQL is often a primary tool) as well as marketers, salespeople, HR specialists, auditors, and many more. Read more 26 Jul 2022 András Novoszáth How to Get More from Your BI Tools with SQL Are you frustrated with the limitations of your business analytics tool? Do you wonder if there are other features you could tap into? Would you like to know how SQL compliments your work with Power BI and Tableau? Read this article to learn more! If you are a data analyst or if data analysis is part of your everyday job, Business Intelligence (BI) tools are crucial for your work. You also know that most databases run SQL queries in the background of such tools. Read more 21 Jul 2022 Kateryna Koidan Use SQL for Data Analysis With the New Google Analytics 4 As Google is sunsetting its Universal Analytics in favor of Google Analytics 4, data analysts need to adapt and learn how to get the most from the new tool. In this article, I'll discuss how to enhance your data analysis by using SQL with Google Analytics 4. Universal Analytics by Google has been helping data analysts and marketers in all industries everywhere understand their audience better. However, Google recently announced they would stop their support of Universal Analytics on July 1, 2023. Read more 19 Jul 2022 Alexandre Bruffa Switching from PostgreSQL to MS SQL Server What are the differences in PostgreSQL vs. MS SQL Server? We discuss the similarities and the differences between these two popular SQL dialects. Many of us developers and database specialists began working with free relational databases like PostgreSQL or MySQL for personal projects or small organizations. Some of us have since moved on to organizations using MS SQL Server and have had to learn to use the new tool. You may be wondering how challenging that is and whether you would struggle with SQL Server under similar circumstances. Read more 14 Jul 2022 Kamila Ostrowska 5 Tips for Learning SQL for Beginners Being data-driven is a hot trend right now. Employers are looking for people who can work with databases. This is why you should learn SQL. In this article, I'll explain how to go about doing so. Yes, learning SQL may be the right thing for you even if you have never seen a line of code. As with any new skill, it requires the right approach and the right resources. Read more 12 Jul 2022 Himanshu Kathuria What Is SQL Used For? So you’ve heard about databases and SQL, but you’re not sure what the big deal is. Read on to find out why data skills like SQL are so important. It seems like every other job requires you to know something about data, databases, and SQL. But what are these things, and what are they used for? Who even uses SQL? That’s what we’ll discuss in this article. Why Data Is So Important The Internet and the technology revolution have brought unprecedented opportunities. Read more 7 Jul 2022 Tihomir Babic An Overview of SQL Text Functions in MySQL Do you work in MySQL as a data analyst? Then you should know how to use its text functions – data analysts don’t work only with numbers. Reporting requires computations, data classification, and label creation, and you can do all of that in MySQL. In this article, I’ll explain several of the most common and useful MySQL text functions by discussing what they do and showing how they do it. Read more 30 Jun 2022 Ignacio L. Bisso Learn the OVER() Clause in SQL with 7 Examples Learn how to use the OVER() clause in your SQL queries and you will take a step forward in your SQL knowledge. Most data analysts and SQL developers have a good handle on the SELECT, FROM, WHERE, GROUP BY, and ORDER BY clauses. However, these clauses are only a limited subset of the SQL language. There are other clauses, such as OVER(), which allow us to create flexible SQL reports and add an enormous expressive power to the SQL language. Read more 28 Jun 2022 Kateryna Koidan What Is SQL? SQL may be something you hear about from your colleagues. Or you may see it in the job description for your dream role or notice it in a list of the most popular programming languages. So, what is SQL? Should you learn it? Let's find out. Do you think about a career in data analysis and data science? Do you need to interact with relational databases at work? Do you want to improve your performance as a marketer, HR specialist, or researcher by making more informed decisions? Read more 21 Jun 2022 LearnSQL.com Team Prepare for a SQL Interview with LearnSQL.com You've been working hard to get a SQL interview at your dream company. Now they’ve called – and you need to prepare if you’re going to ace it. In this article, I’ll show you the most efficient way to prepare for a job interview using the interactive SQL courses at LearnSQL.com. SQL is an essential skill for anyone working with data. Wanna be a data analyst, data scientist, software engineer, or tester? Read more 16 Jun 2022 Himanshu Kathuria Learn SQL in 4 Steps Want to work with data? You’ll need SQL. Fortunately, you can learn SQL in just 4 steps! If you are interested in data crunching or working with data in general, you’ve probably heard something about SQL. Now that data storage is cheap and accessible, data from every transaction can be stored and analyzed. Hence, there’s great demand for people who can capture and work with this data. We’ve even seen entire companies profit from being proficient with data; for example, consider the ever-growing value of Google and Facebook (now Meta). Read more 14 Jun 2022 Himanshu Kathuria These SQL Queries Will Help You With Data Analysis Need to streamline your everyday data analysis tasks? This article explains how basic SQL queries can help. If you are planning a corporate career or any field that involves working with data, you must have come across SQL, or Structured Query Language. SQL was first developed in the 1970s and it continues to be the industry standard for database interactions. Many of you may already have decided to learn this language, given how powerful it is. Read more 9 Jun 2022 András Novoszáth 5 Tips for You From a Senior SQL Data Analyst Are you looking for tips for becoming a better data analyst? Do you want to know about the mistakes and issues you may face? I have collected five tips for your everyday work based on my experience as a data analyst. You may have already read about what data analysts do, how much they earn, and how to become one. However, there is more to it than just becoming a data analyst. Read more 7 Jun 2022 Tihomir Babic How to Combine Two Aggregate Functions in SQL Having trouble using two aggregate functions in one query? This article will show you how to do it the right way – actually, the two right ways. In data analysis and reporting, we often need to count the number of records or sum them up and then calculate the average of this count or sum. Translated to SQL logic, this is the aggregation of aggregated data, or multi-level aggregation. For aggregation purposes, there are the SQL aggregate functions. Read more 1 Jun 2022 Jakub Romanowski Free SQL Course of the Month – PostGIS What is PostGIS, and why should you learn it? (Hint: Our SQL PostGIS course is free throughout June 2022!) Did you know databases can store geographic data? This is how interactive maps are made, most often based on PostGIS. In this article, I will tell you what PostGIS is and why it’s worth learning. Moreover, I am going to offer you an awesome online PostGIS SQL course which you can do for free during June 2022! Read more 31 May 2022 Dorota Wdzięczna How to Install a MySQL Database on a Windows PC Do you want to install a MySQL database on your Windows computer? And maybe find out how to start using a MySQL database? In this article, we’ll cover the installation process. MySQL is one of the most popular relational database servers. This is one reason to start using a MySQL database. Among the various editions of MySQL delivered by Oracle, the Community edition is available for free. You can download it from the MySQL website. Read more 26 May 2022 Marcin Koryszewski Over 40 and Want to Upskill? Learn SQL! You have several years of experience. Your work has even been written up in a few case studies. Yet, you still have a hard time finding the right path to improve your career. If that's true for you, the answer is to learn SQL. In this article, I'll tell you why. Why learn SQL when you’re already an experienced professional? It’s always good to learn something new. You may want to pick up a new hobby, try out a different industry, or get a new skill to help your career. Read more 24 May 2022 Ignacio L. Bisso How to Use the COALESCE() Function in SQL SQL users are often faced with NULL values in their queries and need to process them properly. The COALESCE() function helps handle NULL values. Read this article to learn how to use COALESCE() in your queries. SQL tables store data in records, and records are composed of fields. There can be situations where we don’t know the value for a specific field. For example, let’s suppose we have a table with data for persons. Read more 19 May 2022 András Novoszáth The Recent Rise of DBT and the Analytics Engineer If you’re interested in data engineering or data analytics, you should know about DBT. And you should also learn about the role of an analytics engineer. We cover both in this article. The rise of Cloud data providers has led to new challenges and possibilities. If you are thinking about entering the data analytics space, it is important to be aware of them; it can help you decide what roles to aim for and what skills to learn. Read more 17 May 2022 Tihomir Babic Top 9 SQL GROUP BY Interview Questions Preparing for an SQL job interview? This guide will walk you through nine basic, intermediate, and advanced GROUP BY questions that you may have to answer. There are common GROUP BY questions that pop up in a lot of SQL job interviews; in this article, we’ll explain how to answer them. If you are a data analyst or another data professional preparing for an interview, this article aims to help you out. Read more 12 May 2022 Tihomir Babic What Are Window Functions in SQL? In this article, we discuss what window functions are and how they help you do your job as a data analyst or specialist. No, window functions have nothing to do with the operating system. The window here refers to a set of rows over which the function aggregates data. To learn how window functions work, what functions there are, and how to apply them to real-world problems, it’s best to take the Window Functions course. Read more 10 May 2022 Kateryna Koidan The Complete Guide to the SQL WHERE Clause Learn how to use the SQL WHERE clause to filter rows. In this comprehensive article, we cover comparison operators and the BETWEEN, IN, LIKE, AND, OR, and NOT operators. Filtering output rows is one of the first things you need to learn when starting your SQL journey. In this guide, we’ll see how to use the SQL WHERE clause to filter rows in different scenarios. We’ll cover basic and some more advanced use cases. Read more 5 May 2022 Himanshu Kathuria Why Should Every Data Analyst Know SQL? Updated on: May 15, 2024 Want to become a data analyst? Then you’ll want to get cozy with SQL. In this article, I’m going to break down why mastering SQL is not just helpful but essential. We’ll look at how it can beef up your analysis skills and open doors to some really exciting job prospects. So, let’s see why SQL is a must-have tool for anyone aiming to be a top-notch data analyst. Read more 28 Apr 2022 Kateryna Koidan How to Update Only the First 10 Rows in SQL Real-world databases require continuous updating. Often, you need to update specific records; you may even want to update only the first row, or the first 10, 100, or 1000 rows. Let’s explore how to update rows for a specified quantity from the top in SQL. What Is the SQL UPDATE? In SQL, an UPDATE statement modifies existing records of a table. You may choose to update entire columns or update rows filtered with a WHERE statement. Read more 26 Apr 2022 Kamila Ostrowska Top 5 MySQL Query Tools (Updated for 2024) Updated on: May 4, 2024 Are you on the hunt for a MySQL query tool that will make your database management a breeze? Let's dive into five of the best tools out there that promise to boost your productivity and make handling databases feel less like a chore. These tools come packed with features aimed at slashing the time you need to spend managing your data. Whether you're a developer, a database administrator, or just someone eager to get more out of your data management efforts, these MySQL query tools could be just what you need. Read more 21 Apr 2022 Himanshu Kathuria The SQL Syntax Is Simple: True or False? Updated on: April 19, 2024 Are you contemplating learning SQL but are concerned about how difficult it may be, especially if you have no prior coding experience? If so, you are not alone. In this article, I show you how simple the syntax of SQL is and that it is worth your time to learn it. You just need to know how to approach it properly. Many people carry the notion that learning SQL is much like learning other programming languages. Read more 19 Apr 2022 Dmitri Vaitkun What Are the Different SQL JOIN Types? You just can’t understate the importance of the JOIN when learning SQL. Not only is it one of the most fundamental operations in relational databases, but it is also very versatile with many different types. Although SQL JOIN may be intimidating at first, it becomes a very handy instrument in your arsenal once you understand it. Let’s explore all the SQL JOIN types! We can safely say the JOIN operation is one of the most powerful features of SQL. Read more 31 Mar 2022 Ignacio L. Bisso How to Use the ROUND() Function in SQL Need to round numeric results in SQL? The ROUND() function is here to do the job. Modern relational databases offer many built-in functions that extend the capabilities of SQL. In this article, we will use practical examples to explain how the ROUND() function works. (Spoiler alert: If you guessed that it rounds a number to a certain decimal place, you’re right! Read on to find out more.) SQL Standard Functions Each SQL database (PostgreSQL, MySQL, Oracle, SQL Server among others) has a set of built-in functions. Read more 24 Mar 2022 Tihomir Babic How to Write Multiple CTEs in SQL Leverage the full potential of the CTE by combining two or more of them in a single SQL query. Common table expressions, or CTEs, can be a powerful SQL tool. When you write two (or even more) CTEs together, this power multiplies. In this article, I’ll show you three ways of writing multiple CTEs: Using two independent CTEs in one SQL query. Using two CTEs where the second CTE refers to the first. Read more 22 Mar 2022 Tihomir Babic The SQL Substring Function in 5 Examples Working with text data in SQL? We explain how to get values from any point in a string. When you think of working with data in SQL, your first thought is probably a database full of numbers and your SQL code doing very fancy calculations. But text is data, too! It’s very common to find text data in databases. Not only do you have to extract it, but often you also have to manipulate it. Read more 17 Mar 2022 Kateryna Koidan Are You Ready to Become a Data Analyst? Data analysts enjoy strong career prospects. Do you have the skills required for this role? Let’s find out! If you enjoy working with data, searching for interesting patterns and valuable insights, you may wonder “Should I become a data analyst?” In this article, I’ll explain what data analysts do and what skills a successful data analyst needs. What Does a Data Analyst Do? Data-driven organizations rely on specialists who know how to get value out of data. Read more 15 Mar 2022 András Novoszáth SQL and Cloud Databases Are the Perfect Match! Do you want to do analytics in the cloud? Are you considering learning SQL and wondering whether you can use it with cloud-based databases? Do you want to know how cloud databases and SQL work together? We answer your questions in this article. Read on! You may be an analyst who has heard about cloud databases and SQL and want to learn more. Maybe you are already familiar with them and want to know if the two technologies fit together. Read more 10 Mar 2022 Marcin Koryszewski These Are the Websites You Should Know When Learning SQL Updated on: April 6, 2024 If you're diving into SQL and searching for top-notch resources to enhance your learning, you've arrived at the right article. Discover the ultimate SQL learning websites that we’ve carefully chosen to support your educational journey. Today, I'm going to share a list of websites that will help you with learning SQL. You will find useful resources, get introduced to some fantastic communities, and expand your database knowledge. Read more 24 Feb 2022 Jakub Romanowski New MySQL Courses Are Here! A lot of you have been waiting for new MySQL courses on LearnSQL.com – and finally, they’re here! Now you can learn everything MySQL in a simple, understandable, and fun way. We've worked a lot with these online SQL courses and created hundreds of interactive exercises to help you learn this popular SQL dialect. If you want to communicate with the world’s most popular open-source database, our MySQL courses will help you achieve that goal! Read more 23 Feb 2022 LearnSQL.com Team LearnSQL.com’s Monthly SQL Practice in 2022 Are you looking for ways to practice SQL? Tired of boring exercises based on unreal scenarios? We have something for you! Every month, we publish a new set of SQL practice exercises. You'll find all of them in the monthly SQL Practice. Here at LearnSQL.com, we believe the best way to learn SQL is through practice. All of our SQL courses (and there are over 30 of them!) are hands-on. Read more 22 Feb 2022 Dominika Florczykowska An Overview of MySQL Data Types What data types are available in a MySQL database? In this article, you’ll learn about numeric data types, text data types, and much more! You may have seen our article about data types in SQL. Here, we focus on the MySQL data types. We will discuss the most commonly used ones: numeric, text, and date and time. If you are interested in the topic, be sure to check out our Data Types in SQL course. Read more 15 Feb 2022 Kateryna Koidan How to Keep Unmatched Rows From Two Tables in a SQL JOIN Are you looking to join two tables in SQL without removing unmatched rows? Do you want to keep unmatched rows from one or both tables? In this article, I’ll explain how to keep all the records you want by using outer JOINs, such as LEFT JOIN, RIGHT JOIN, and FULL JOIN. Examples included! The SQL JOIN is a powerful tool that helps you combine data from multiple tables of your database. Read more 10 Feb 2022 Tihomir Babic How to Query a Parent-Child Tree in SQL What are parent-child tree structures in SQL? In this article, we answer that question, talk about query hierarchy, and demonstrate the five most common SQL queries you’ll need for these data structures. Yes, you can use SQL on a parent-child tree structure. I’ll show you how in this article. Along the way, I’ll walk you through five query examples, starting with the easiest and ending with the most complex. Read more 8 Feb 2022 Himanshu Kathuria What Is the Future of the Data Engineer? If you are wondering about the future of data engineering as a career and whether it is worth becoming a data engineer, then this article is for you. Here, I cover how lucrative the prospects are for data engineering and how you can get started and thrive in the domain. “Data” is probably one of the most used terms in our everyday business language today. A data engineer plays a pivotal role in developing the infrastructure required for data-related actions. Read more 3 Feb 2022 Karolina Niewiarowska Is Learning PostgreSQL in 2022 Worthwhile? You want to take a SQL course, but selecting the right one can be too challenging. Perhaps you don't know which dialect you should start with? PostgreSQL is one of the best options. Check out if it is worth it to learn PostgreSQL in 2022. When you search the web, there are many job advertisements for database specialists. Perhaps that is why you have chosen the direction toward development. Or maybe you are just fed up with Excel in your day-to-day duties (which is not surprising) and want to make work easier. Read more 27 Jan 2022 Kateryna Koidan How Do You Get Rid of Duplicates in an SQL JOIN? Do you have unwanted duplicates from your SQL JOIN query? In this article, I’ll discuss the possible reasons for getting duplicates after joining tables in SQL and show how to fix a query depending on the reason behind the duplicates. Data analysts with little experience in SQL JOINs often encounter unwanted duplicates in the result set. It’s challenging for beginners to identify the reason behind these duplicates in JOINs. Read more 25 Jan 2022 Tihomir Babic The SQL OVER() Clause Explained Here is a detailed explanation of the OVER() clause in SQL window functions. This is a detailed guide on using the OVER() clause in SQL window functions. I will focus specifically on this clause, which requires that you have at least a general idea of how window functions work. To make the best out of this article, take a look at the SQL Window Functions Cheat Sheet. Feel free to have it by your side as we go. Read more 20 Jan 2022 Andrew Bone 10 PostgreSQL Interview Questions and Answers Job interviews are always stressful. Interviewing and getting asked technical questions about PostgreSQL is even more of a challenge! In this article, we’ll cover some of the PostgreSQL interview questions you can expect when applying for a new job. By the end of the article, you should be able to handle most of the questions you are likely to face. We’ve previously covered common questions you can expect at a SQL job interview, but this article will be focused on Postgres specifically. Read more 19 Jan 2022 Ignacio L. Bisso What Is a Common Table Expression (CTE) in SQL? Updated on: July 19, 2024 The common table expression (CTE) is a powerful construct in SQL that helps simplify a query. CTEs work as virtual tables (with records and columns), created during the execution of a query, used by the query, and eliminated after query execution. A CTE is defined using a CTE query definition, which specifies the structure and content of the CTE. CTEs often act as a bridge to transform the data in source tables to the format expected by the query. Read more 18 Jan 2022 Kamila Ostrowska The Top 5 SQL Courses and Learning Platforms for 2022 It’s the New Year! Time to start thinking what good you can do yourself in 2022. If you haven’t decided yet, we want to recommend learning something new – specifically, learning SQL. Maybe learning SQL is already on your 2022 to-do list. If so, take it seriously – learning SQL can change your career path and even your life! It makes sense to find the best SQL courses so you can learn effectively. Read more 13 Jan 2022 Karolina Niewiarowska Top 10 Beginner Online SQL Courses in 2022 Ready for New Year’s changes? Good, because now you have a perfect chance to achieve something new: Improve your skills by learning SQL! In this article, we’ll point you toward some great online SQL courses to help you meet this goal. SQL, or Structured Query Language, is the language used to communicate with relational databases. When you know SQL, you can add, delete, change, and make calculations using the data in a database. Read more 11 Jan 2022 Himanshu Kathuria The Most Popular Databases for 2022 With the number of database products increasing with each passing year, it is important to understand which database best fits your use case. This article lists the top-ranking databases available in the market today. When something that first became popular in the early 1980s is not slowly fading away but is still evolving and becoming more relevant, you know it had to be an important invention. The database is no exception. Read more 28 Dec 2021 Karolina Niewiarowska Here’s How I Started Creating SQL Reports Once upon a time, there was a girl who was just starting her adventure with learning SQL. As a marketer, one of her tasks was writing reports. Previously, she used Excel, a calculator, and written notes to prepare the reports her boss required. One day, it turned out that she could do her job much faster and easier. That was the day she read about SQL reports for the first time. Read more 16 Dec 2021 Kamil Bladoszewski Is SQL Case-Sensitive? Is SQL case-sensitive? The question seems simple, and you may think it’s a yes-no question. However, the answer depends on multiple factors. Let’s take a look at the possible answers. First of all, this question can be understood in multiple ways. Which part of SQL are you asking about? Do you mean keywords (e.g., SELECT, WHERE, etc.), table and column names, or values in the columns? Which database management system (DBMS) do you have in mind? Read more 14 Dec 2021 Jakub Romanowski Top 5 MS SQL Server Courses for Beginners Every journey, including a career change, begins with the first step. If you're thinking about learning data analysis or strengthening your MS SQL Server skills arsenal, you've come to the right place. Here are the top 5 MS SQL Server online courses. Enjoy! You've probably heard that today’s organizations rely heavily on data analysis. You heard right. They are looking for employees who can navigate the world of databases and draw conclusions from data. Read more 26 Nov 2021 András Novoszáth Here’s Why You Should Use SQL for Sales Analytics Would you like to understand how your sales efforts play out so that you know where to put your focus? Do you want to empower your sales teams with sales analytics? This article shows you how you can use SQL to use your sales data to your advantage. If you work in sales, understanding the activities that produce results has financial consequences for you, your team, and your company. This is where sales analytics can really help you. Read more 25 Nov 2021 Kateryna Koidan 5 Best Practices for Writing SQL JOINs These best practices for SQL JOINs will help you make readable SQL queries that deliver accurate, clear, and understandable output. Considering that relational databases are built around related tables, it’s no wonder that SQL JOINs – which allow you to combine information from multiple tables – are one of the primary skills acquired by SQL newbies. SQL JOINs course by LearnSQL.com is the perfect place to refresh your knowledge about JOINs. Read more 24 Nov 2021 Tihomir Babic Top 5 SQL CTE Interview Questions Here are five questions (and solutions!) on CTEs you’ll (probably) be asked at an interview. I’m not saying you will get these SQL CTE interview questions at every job interview. But when you do, they are probably along the lines of the five I’m about to show here. Other than theoretical questions about CTEs, there are not that many variations in the CTE scenarios evaluated by interviewers. Go through these five examples, and you get a good foundation for acing your interview! Read more 18 Nov 2021 Kateryna Koidan 5 SQL Subquery Examples SQL subqueries are basic tools if you want to communicate effectively with relational databases. In this article, I provide five subquery examples demonstrating how to use scalar, multirow, and correlated subqueries in the WHERE, FROM/JOIN, and SELECT clauses. A subquery, or nested query, is a query placed within another SQL query. When requesting information from a database, you may find it necessary to include a subquery into the SELECT, FROM , JOIN, or WHERE clause. Read more 16 Nov 2021 Kamila Ostrowska SQL for Startups – Do You Need It? If you’ve been wondering whether to use SQL in your startup, it’s probably high time to do so. SQL can be an amazing tool for small, fast-growing businesses. But don’t worry if you’re unfamiliar with SQL for startups. Maybe you are not sure what SQL is all about. Don’t worry; you don’t have to make any decisions this second! First, answer these questions: Can you think of any data related to your business – prices, clients, details about clients, production details, budget, costs, strategy, or anything else? Read more 11 Nov 2021 Martyna Sławińska What Are Aggregate Functions in SQL, and How Do I Use Them? Data is your source of knowledge. And thanks to SQL aggregate functions, you can extract the precise knowledge you need from your data efficiently. Read along to find out more. The core SQL aggregate functions are the following: COUNT(column_name | *) returns the number of rows in a table. SUM(column_name) returns the sum of the values of a numeric column. AVG(column_name) returns the average value of a numeric column. Read more 10 Nov 2021 Jakub Romanowski A Chat with Anthony DeBarros, Author of Practical SQL Some make model ships, others collect stamps. I read SQL books. I've read a lot of them, but only a very few deserve to be called really good. Some of them were included in my Best SQL Books list. The good news is that one of them just got a new release. It was great, even better than the previous edition! Moreover, I was able to talk to its author, Anthony DeBarros. Read more 9 Nov 2021 Himanshu Kathuria How to Write a WHERE Clause in SQL We explain how to use the SQL WHERE clause with practical examples. If you have just started learning SQL and want to know how to retrieve or work with only a specific portion of the data stored in your tables, then this article is for you! The SQL WHERE clause is something you must master if you wish to use SQL for working with data. It is arguably one of the most basic and must-learn constructs of SQL. Read more 5 Nov 2021 Karolina Niewiarowska How Can SQL Developers Remember Everything They Learn? Are you at the beginning of your SQL journey? Congratulations, great choice! But you may find the knowledge you gain leaks with time. Find out what SQL developers do to remember everything they learn for a long time. If you learn SQL, the road to the expert level is long, winding, and bumpy. But don't worry – we've all been through it. You know perfectly well it's worth it. And if you don't already know, here are the reasons why you should start learning SQL NOW! Read more 3 Nov 2021 Andrew Bone What Is the DELETE Statement in SQL? This article will explain the use of the DELETE statement, one of the primary methods of removing existing records from your database. First we will run through the syntax, followed by some easy-to-understand examples. The DELETE statement in SQL is extremely useful. It allows you to remove any obsolete or “bad” data from your database tables. You should exercise caution when using the DELETE statement, as the operation is not reversible. Read more 2 Nov 2021 Jakub Romanowski SQL Course of the Month – Window Functions in PostgreSQL This is what distinguishes ordinary SQL users from professionals – SQL window functions! Would you like to practice them in PostgreSQL, on one of the best interactive SQL courses in the world, and pay nothing for it? Throughout November, you have access to the Window Functions in PostgreSQL course for FREE. You read it right: you won't pay a penny! What's the catch? Why would someone give you a free course? Read more 29 Oct 2021 Ignacio L. Bisso What Is a Rolling Average and How Do You Compute It in SQL? In this article, we will show three different examples of using SQL to calculate rolling averages. Learn this and you will take an important step in your SQL growth! A rolling average is a metric that allows us to find trends that would otherwise be hard to detect. It is usually based on time series data. In SQL, we calculate rolling averages using window functions. First, let’s talk about what rolling averages are and why they’re useful. Read more 28 Oct 2021 Jakub Romanowski Top 5 Linux Distributions for SQL The world is divided into Linux lovers and people who have never tried it before. Still working on Windows or macOS? Do you want to learn SQL? Do you know a large proportion of IT professionals use Linux? It's not a coincidence. But which Linux distribution should you choose for learning SQL? Here's my factsheet to help answer that question. Linux Distribution: What Is It? What is a Linux distribution? Read more 27 Oct 2021 Kateryna Koidan SQL Date and Time Functions in 5 Popular SQL Dialects Are you confused by all the date and time functions used across different SQL dialects? In this article, I summarize the date and time data types used in PostgreSQL, Oracle, SQLite, MySQL, and T-SQL. I also provide examples with the key SQL date and time functions used across these dialects. It’s time to become date and time gurus! Do you want to calculate how often employees are running late for work? Read more 22 Oct 2021 Jakub Romanowski New Window Functions Practice Set Is Here! Have you learned the SQL window functions? Or maybe, you forgot when and how to use them correctly? Are you preparing for an advanced SQL job interview? You've come to the right place! This is the new Window Functions Practice Set. This is very good news for all SQL learners and database professionals who want to improve their skills. The LearnSQL.com Team is proud to present the new Window Functions Practice Set! Read more 21 Oct 2021 Himanshu Kathuria The SQL Count Function Explained With 7 Examples One of the most useful aggregate functions in SQL is the COUNT() function. If you are new to SQL and want to learn about the various ways to use the COUNT() function with some practical examples, this article is for you. The COUNT() function is one of the most useful aggregate functions in SQL. Counting the total number of orders by a customer in the last few days, the number of unique visitors who bought a museum ticket, or the number of employees in a department, can all be done using the COUNT() function. Read more 20 Oct 2021 Marcin Koryszewski 2021’s Most Popular Databases What was the most popular database in 2021? And what do you need to know to use it? If you’re learning SQL, you’re in luck. This year’s most popular database uses SQL. But the list doesn’t end there. Read our article and find out the 5 most popular databases this year. My list was based on the latest research of one of the most important platforms in the IT world: Stack Overflow. Read more 19 Oct 2021 Tihomir Babic What Is a Recursive CTE in SQL? The article that’ll show you practical examples of using recursive CTEs in SQL. If you’ve heard about SQL’s recursive CTEs but never used them, this article is for you. It’s also for you if you never get tired of recursive CTE examples. Before we dig into recursion, I’ll remind you what CTEs are and what their syntax is. Then I’ll do the same for recursive CTEs. After that, I’ll show you how recursive CTEs work in three examples. Read more 15 Oct 2021 Kateryna Koidan How to Join Only the First Row in SQL In your projects, you may encounter situations when you have many orders corresponding to one customer or many temperature observations corresponding to the same location, but you only need to join the first row with the most recent order or the most recently observed temperature to the corresponding record in another table. In this article, I’ll go through several ways to do this in SQL. The best way to practice basic and advanced SQL is our interactive SQL Practice Set course. Read more 14 Oct 2021 Kateryna Koidan Still Using Excel for Data Analysis? See Why SQL Is Better! Are you working with data and still using spreadsheets? Many people think that only programmers or professional data analysts can leverage SQL for data analysis. In this article, I’ll show how people with no IT background can use SQL for their daily work tasks. Not all people working with data have the corresponding job titles like data scientist, data analyst, or data engineer. Following the data democratization trend, almost all office workers do something with data as part of their daily duties – marketers analyze advertising campaigns, HR specialists analyze employee dynamics, auditors analyze credit portfolios, etc. Read more 12 Oct 2021 Andrew Bone Numeric vs. Decimal Data Types in SQL In standard SQL, there is a slight difference between the NUMERIC and DECIMAL data types. However, in some variants of SQL, there is no difference! This article will clear up any confusion. In this article, I’ll explain the differences and similarities between SQL’s standard NUMERIC and DECIMAL data types. Then I’ll discuss how these data types work in common SQL dialects. We’ve already posted a more general article on SQL data types; this time, we’ll drill down further on just the DECIMAL and NUMERIC data types. Read more 8 Oct 2021 Andrew Bone How to Sort Values in a Specific Order in SQL Sometimes you will be required to order your data in a particular way, and often the use of typical sort modifiers like ASC and DESC are not enough. This article will show you how to use the CASE statement to order your data exactly how you need it to be. Have you ever needed to order your data in a very specific way? One of the best methods for handling complex sorting is using CASE. Read more 7 Oct 2021 Tihomir Babic How to Use CASE in ORDER BY in SQL This article will show you how and when to use CASE in an ORDER BY clause. Have you ever used a CASE statement? I’m sure you have, at least in a SELECT statement. But have you ever used it in an ORDER BY clause? No? You will, once I show you how! Don’t worry if you’ve never used a CASE statement. I’ll show and explain it to you with a short example. Read more 6 Oct 2021 Karolina Niewiarowska How SQL Helps Everyone in Your Office I don't know about you, but I really like to make my life easier. If something can be done faster and more efficiently, especially if it's everyday, routine tasks, I’m all for it! This is where SQL works brilliantly. It's not just about complicated data analysis. Everyone in the office works with different types of data, and SQL can help anyone. How? Anything is possible once you learn SQL! Read more 5 Oct 2021 Kamila Ostrowska Best Places to Practice SQL JOINs Online You’ve just started your journey with SQL and you’re not sure what a JOIN is or where to use it. Don’t worry! In this article, you will find out what JOINs are and where you can practice them online. If you have just started learning SQL, you have a lot of topics to cover before you can call yourself a data professional. If you are serious about using SQL, you’ll have to understand JOIN – what it does, when you can use it, and what its different variants do. Read more 1 Oct 2021 LearnSQL.com Team Free Course of The Month – SQL Practice Set in MS SQL Server You have to train a lot to learn a new skill. It is the same with MS SQL Server. Do you want to write good SQL queries? Or maybe you are preparing for a job interview? You've come to the right place! Throughout October you will have access to our amazing hands-on MS SQL Server course for FREE! You probably just thought: “There must be a catch. Why would someone give away SQL courses for free? Read more 28 Sep 2021 Tihomir Babic Difference Between ROWS and RANGE in Window Functions Are you familiar with ROWS and RANGE window functions but not sure how they are different? This article makes those differences clear. In using SQL window functions, you’ve probably come across ROWS and RANGE clauses. If you haven’t, they are both parts of the Window Functions course. If you have, it’s quite likely you have been left confused why there are two keywords for the same function. Well, they are not the same! Read more 24 Sep 2021 Kateryna Koidan 7 Things Every Data Engineer Should Know People generate massive amounts of data every day. To get insights from data, organizations need to capture and process them efficiently. That is when data engineers are called up. In this article, I’ll discuss the data engineering role and the skill set necessary to succeed in the role. As the world generates more and more data every year, the IT industry creates new roles to deal with it. These roles include data analysts, data scientists, machine learning engineers, and data engineers. Read more 23 Sep 2021 Himanshu Kathuria Find Top Salaries by Department with SQL This article shows how to get the total salary by department for an organization, using the GROUP BY functionality of SQL. We explain the SQL GROUP BY clause in detail along with conditional filtering using a HAVING clause. Understanding the salary outlay for an organization is one of the common starting points for business leaders. It helps them see who in the organization has the highest total salary cost, department-wise. Read more 22 Sep 2021 Tihomir Babic The 7 Best Articles about the SQL Recursive Query Do you want to learn about recursive queries but don’t know where to start? Here’s our selection of seven articles that should help you with diving into the recursive queries world. I won’t lie to you. Learning and understanding recursive queries can be difficult. But difficult things are usually worth trying. And by learning recursive queries, you’re making sure you know how to work with this very powerful tool. Read more 21 Sep 2021 Kateryna Koidan 5 Practical Examples of Using ROWS BETWEEN in SQL SQL window functions are tremendously useful for calculating complex aggregations like moving averages or running totals. The ROWS clause allows you to specify rows for your calculations, enabling even more sophisticated window frames. Here are five practical examples of leveraging the ROWS BETWEEN clause in SQL. Window functions (also called OVER functions) compute their result based on a sliding window frame (i.e. a set of rows). They are similar to aggregate functions in that you can calculate the average, total, or minimum/maximum value across a group of rows. Read more 17 Sep 2021 Dorota Wdzięczna How to Export a CSV File From a T-SQL Query Knowing SQL queries to select data from databases allows you to obtain information easily. However, there are many situations in which we need to export data to another platform or application. The CSV file is a solution to this problem. If you'd like to master complete SQL, try out our interactive SQL from A to Z track. It contains 7 hands-on SQL courses that will take you from a beginner to an advanced SQL user. Read more 16 Sep 2021 Kateryna Koidan How Developers Can Build SQL Skills Even though you cannot build an application using SQL, employers continue to add SQL skills to their job requirements for software developers. In this article, I’ll elaborate on why developers need to know SQL and how you can learn SQL most efficiently. As a developer, you may work on different kinds of projects. Not all of your projects require doing string manipulation, but that doesn’t mean you don’t need to know how to do this. Read more 15 Sep 2021 Himanshu Kathuria Top 10 Tools for Business Analytics Business Analytics is one of today’s hottest career fields. However, success as a business analyst requires that you learn the right skills and software programs. Let’s see what tools you should know if you want to be a business analyst. With the world generating immense amounts of data – and having systems in place to capture and manipulate that data to fuel business growth – job opportunities for business analysts are only going to grow. Read more 14 Sep 2021 Andrew Bone How to Use Aliases with SQL JOINs SQL aliases are custom names that you can give to the columns and tables you include in your queries. Aliases are very useful, as they can greatly improve the readability and maintainability of your query. We’ll be taking a closer look at using SQL aliases with JOIN and why you might need to do so. The best way to master aliases in SQL is practice. I recommend our interactive SQL Practice Set course. Read more 10 Sep 2021 Tihomir Babic Frequently Asked Questions About SQL Ten SQL questions that you should be able to answer if you’re applying for an SQL job. SQL is a vast topic and a source of endless questions from its users. However, some questions are asked more frequently – usually about concepts that most SQL users will need to know. It’s not surprising that interviewers tend to ask these same questions to SQL job candidates. Either way, knowing these questions is a first step to learning SQL. Read more 9 Sep 2021 Jakub Romanowski Top 5 SQL Audiobooks No time to learn SQL? What if I said you could learn while sitting in traffic or washing dishes? It’s possible thanks to SQL Audiobooks. Check out which ones you should listen to. I have been recommending various SQL books for a long time. If selected well, they can be a great complement to the knowledge gained in interactive online courses. If you haven't read my article yet, check it out. Read more 8 Sep 2021 Karolina Niewiarowska How to Show Your Sql Experience Do you want to work in the IT industry? This is now one of the best ideas for a good career. What should convince you to do so? Demand for specialists, high earnings, and the fact that it is a future-proof profession. Interestingly, it's not gonna be that hard – especially for you, smartie! You just need some skills and good preparation for an interview to be successful. I'll tell you how to land a great job! Read more 7 Sep 2021 LearnSQL.com Team Fall 2021 Track of the Season: SQL from A to Z The ability to analyze data is one of the most sought-after skills in job applicants. Why? Because all organizations want to take advantage of the power of data. And one of the basic tools for that is SQL! See why we have chosen the SQL A to Z track as our track of the season. This fall, take your analytical skills to the next level! Let's start with the basics. Read more 3 Sep 2021 András Novoszáth Why You Should Use SQL in Marketing Analytics Have you been wondering how you could use SQL in your marketing data analysis work? Would you like to create SQL reports to guide your marketing decisions? In this article, you will learn how to use SQL for marketing through plenty of use cases. Are you a marketing professional wanting to better understand the results of your marketing efforts? Do you want better means to prove your point and demonstrate the value you create? Read more 2 Sep 2021 Karolina Niewiarowska How Hard Is It to Learn SQL Without IT Experience? Updated on: September 12, 2023 Learning SQL doesn't have to be difficult! Taking an interactive SQL course is a great way to start your career in the high-paying world of IT. When you started your adventure with computers, you surely didn't realize how far you could go. You were probably only a few years old, and your first experience with a computer was probably gaming. Today, computers provide more than just quick access to entertainment; they’re a great tool for earning money. Read more 1 Sep 2021 Jakub Romanowski Free Course of the Month: SQL Server Revenue Analysis It is impossible to run a business without a good analysis of revenue trends. But how do you do it effectively? You can rely on good old Excel, but a much better idea is to use SQL and databases. Learn how to create SQL reports and track the growth of your business with MS SQL Server. Here is the course, Revenue Trend Analysis in SQL Server. It’s FREE throughout September! Read more 31 Aug 2021 Dorota Wdzięczna SQL MIN and MAX Functions Explained in 6 Examples What are the SQL MIN() and MAX() functions? When should you use them as aggregate functions, and when should you use them with window functions? We explain using practical examples. It’s difficult to imagine SQL without the MIN() and MAX() aggregate functions. They are very useful among many data professionals because they allow us to resolve a lot of business problems. In this article, I will explain what each function does and discuss several use cases. Read more 27 Aug 2021 Marcin Koryszewski How Much Do Data Analysts Earn in 2021? How Much Do Data Analysts Earn in 2021? How much does a data analyst earn? We did some data analysis ourselves. Nothing fancy, but it will give you some extra motivation for learning SQL for your data analyst gig. Data, data everywhere! We live in the world of (big) data. Having data is just the first step. Knowing what to do with it, how to interpret it, and what insights it holds, is true greatness. Read more 26 Aug 2021 Tihomir Babic 3 Real-Life Examples for SQL Common Table Expressions We answer three SQL business questions using CTEs. There are business problems that are often solved in a very roundabout way. While they might get you the correct result, there’s usually a more elegant way to write a solution. Enter the CTEs! They are extremely helpful when it comes to getting a more direct and elegant solution. I’ll show you three business situations where CTEs can be very helpful. You’ll get an idea of when CTEs can be useful. Read more 25 Aug 2021 Jakub Romanowski Why Is the SQL Practice Set my Favorite Online Course? My friends know that I cannot sit still. I always have to do something, read something, and learn new stuff. It's stronger than me. But I don't complain, because this approach has only helped me in my life. I have done a ton of different online courses, but the SQL Practice Set has proved to be the best so far. Find out why. Learning SQL was not easy for me. Read more 25 Aug 2021 LearnSQL.com Team Standard SQL Functions Cheat Sheet Welcome to the ultimate resource for mastering SQL functions - the Standard SQL Functions Cheat Sheet. It's designed to be a quick yet comprehensive reference guide for both beginners and experts. Download yours and start querying with ease. Whether you are a beginner stepping into the world of SQL or a seasoned professional looking to brush up on your skills, our Standard SQL Functions Cheat Sheet is designed to be your go-to guide for SQL functions. Read more 24 Aug 2021 Jakub Romanowski Best SQL Courses for Business Owners Do you have a business? Can you use the data you collect every day? You would probably do anything for it to succeed. Learn SQL and achieve your goals. Here are the best online SQL courses for business owners. SQL is a great tool that allows you to work with databases. Are you looking to acquire a skill or two to help your business grow? SQL is the answer! Read more 20 Aug 2021 András Novoszáth Why You Should Work in a Data-Driven Company Does accessing and using data collected by your company feel painful? Have you heard about data-driven companies? Working in a data-driven company may give you the ownership and the opportunities to use your company’s data. Read our article to learn more! If you work in a company, chances are that you want to do data analysis to solve problems. However, this is often not easy. You face many obstacles, impeding access to the data you need. Read more 19 Aug 2021 Himanshu Kathuria The SQL AVG() Function Explained With Examples We explain the SQL AVG() function with practical examples, covering how and where you can and cannot use it. The average is probably one of the most widely used metrics to describe some characteristics of a group. It is so versatile and useful that it can describe something about almost anything. If you like sports, you see things like average runs per game in baseball, average assists per game or per season in basketball, and so on. Read more 18 Aug 2021 Kateryna Koidan 5 Practical SQL CTE Examples Common table expressions (CTEs) were introduced into SQL to improve the readability and the structure of SQL queries, especially those requiring multiple steps to get the necessary output. In this article, we will go through several examples to show how SQL CTEs can help you with complex calculations and hierarchical data structures. Common Table Expressions in SQL Common table expressions (CTEs), also called WITH clauses, allow creating named subqueries that are further referenced in the main query. Read more 17 Aug 2021 Himanshu Kathuria How to Use CASE in SQL Updated on: February 19, 2024 If you need to evaluate multiple conditional statements, the SQL CASE statement will do the job. To effectively harness CASE in SQL, grasping its structure and practical uses is key. I'll guide you through real query examples showcasing the power of this versatile statement. Here’s what you need to know to use CASE like a pro. Why is CASE so important in SQL? If you’re analyzing or manipulating data, you’ll often want to define rules based on certain conditions, e. Read more 12 Aug 2021 Martyna Sławińska An Overview of MS SQL Server Data Types SQL Server data types define what can be stored in a column, local variable, expression, or parameter. It is essential to pick the right data type. Ultimately. your choice of data types affects the whole database. Read on to learn about all of the data types available in MS SQL Server. In this article, we’ll cover numerical, text, and date and time data type categories in detail. We’ll go through their syntax, storage size, and typical use cases. Read more 11 Aug 2021 Tihomir Babic How to Find the Nth-Highest Salary by Department with SQL Learn how to find the nth-highest salary in SQL, and you’ll learn how to get the nth value in any data. In this article, I’ll focus on one problem and give you several solutions to that problem. The problem is stated in the title already: find the nth-highest salary by department using SQL. This may sound too specific. But by learning how to solve this, you’ll be able to find the nth value in any data, not just salaries. Read more 10 Aug 2021 Andrew Bone What Is the UPDATE Statement in SQL? The SQL UPDATE statement is used to update existing data in your database. This article will explain its syntax and show you clear examples of the UPDATE statement in action. Effectively updating existing data in a database is required for anyone using SQL; data is only useful if it is kept up-to-date and relevant. In this article, we’ll examine the syntax of the UPDATE statement in great detail. Then we’ll dive into detailed step-by-step examples that will drive home the rules, potential uses, and limitations associated with the SQL UPDATE statement. Read more 6 Aug 2021 Karolina Niewiarowska I Needed a Good SQL Course… So I Chose SQL Basics. Why did I decide to take a SQL course? And how did I come across LearnSQL.com? It’s story time! Did I ever think that my professional career would deal with databases? Absolutely not. It didn’t even cross my mind that it would happen. Let me explain why I started learning SQL … and how I got to where I am today. Meet the SQL Newbie I suppose few people have their lives planned from A to Z. Read more 5 Aug 2021 Ignacio L. Bisso How to Define a Window Frame in SQL Window Functions The window function is a super powerful resource of the SQL language. At the core of any window function, there is a set of records, called the window frame, defined using an OVER clause. Knowing what records are in the window frame, how they are ordered, and what their upper and lower bounds are, are critical in understanding how window functions work. In this article, we will analyze and explain with examples how you can define different types of window frames. Read more 4 Aug 2021 Andrew Bone Use SQL on a Movie Database to Decide What to Watch We’ll demonstrate how to use SQL to parse large datasets and gain valuable insights, in this case, to help you choose what movie to watch next using an IMDb dataset. In this article, we’ll be downloading a dataset directory from IMDb. Not sure what to watch tonight? Are you browsing Netflix endlessly? Decide what to watch using the power of SQL! We’ll be loading an existing movie IMDb dataset into SQL. Read more 3 Aug 2021 Jakub Romanowski Free Course of the Month: SQL Reports in SQL Server This is another in our series of free SQL Courses of the Month. This time, you can learn SQL Reporting in MS SQL Server for free. Do you want to be able to prepare even better SQL reports? Or maybe you have some basic knowledge of SQL Server (one of the major SQL dialects) and would like to go a step further? This is the course for you. Read more 30 Jul 2021 Himanshu Kathuria New to Data Engineering? Don't Make These Mistakes It's best to learn from the mistakes of others. This advice also works for data engineering. In this article, you'll find tips to help you advance your career and avoid common data engineering mistakes. The data revolution has produced tremendous opportunities and created various high-paying jobs related to the collection, maintenance, and manipulation of data. Data engineering is one of the most lucrative and interesting jobs of this family. Read more 29 Jul 2021 Michal Stín How to Use SQL to Calculate Customer Lifetime Value (LTV) Working with data is an essential skill for marketers in today's data-driven world. As a marketer myself, I decided to create a series of articles about calculating key performance indicator (KPI) metrics for SaaS (Software as a Service) companies. We’ll start by calculating customer lifetime value (LTV) using SQL. Data is one of today’s most valuable resources. If you work in a SaaS company, you are flooded with a huge amount of data every day. Read more 28 Jul 2021 Zahin Rahman An Overview of SQL Text Functions In this article, we will discuss the ins and outs of the most common SQL text functions, which make it possible for you to find and work on string values. Before we dive into text functions, let’s quickly recap what an SQL function is. Simply put, a function is a predefined built-in piece of code that you can use in your SQL query. For example, the functions SUM(), AVG(), and COUNT() are applied to numerical variables to calculate the sum, average, and number of records respectively. Read more 27 Jul 2021 Jakub Romanowski How to Improve New Employee Onboarding with SQL Courses Are you looking for something to improve the onboarding process of new employees at your company? If they will be working with databases and SQL, and if you need resources for them to learn quickly, choose interactive SQL online courses. You’ve just hired some new employees. Great! After a long recruitment process, you have finally managed to find people who can do the job and meet your expectations. You may have even used our advice on why it makes sense to Practice SQL Before Interviewing a Potential Employee. Read more 23 Jul 2021 Dorota Wdzięczna SQL SUM() Function Explained with 5 Practical Examples Aggregate functions are an important part of SQL knowledge – and there’s no better place to start learning them than with the SUM() function. In this article, you can expand or refresh your SQL with 5 practical examples of SUM(). SQL allows us to do more than select values or expressions from tables. Most operations on relational databases use aggregate functions like SUM() to do computations on data. Read more 22 Jul 2021 Kateryna Koidan What Is the Difference Between WHERE and ON in SQL JOINs? When you join tables in SQL, you may have conditions in an ON clause and in a WHERE clause. Many get confused by the difference between them. In this article, we will discuss this topic by first reminding you the purpose of the ON and WHERE clauses then by demonstrating with examples which types of conditions should be in each of these clauses. Both the ON clause and the WHERE clause can specify conditions. Read more 20 Jul 2021 Tihomir Babic How to Keep Unmatched Rows When You Join two Tables in SQL Learn how to use JOIN to keep both matched and unmatched rows when you join two tables. Joining two or more tables is a skill you need a lot if you’re working with databases. To review and practice your SQL joining skills, I recommend the interactive SQL JOINs course. It contains over 90 exercises and sections on different joining challenges. If you often join tables in SQL, you’ve probably noticed not all data from one table corresponds to data from another table all the time. Read more 16 Jul 2021 Ignacio L. Bisso Top 10 SQL Window Functions Interview Questions Many interesting job positions require SQL skills – and that includes window functions, which are not commonly taught in online courses. In this article, I will cover the top window function questions for every experience level. If you’re going for a job interview for an advanced SQL position or for intermediate to advanced data analyst positions, you’ll probably be asked about your knowledge of SQL window functions. Don’t panic! Although these functions aren’t commonly covered in online courses, we’ve got the answers right here. Read more 15 Jul 2021 Kateryna Koidan 5 Reasons Why You Should Use CTEs Instead of Subqueries Common Table Expressions, or CTEs, were introduced in SQL:1999 to handle cases where the output of one query is used within another query. But didn’t we already have subqueries for this? In this article, I’ll demonstrate with multiple examples why CTEs are better than subqueries for the structure and readability of your SQL queries. Let’s start by reminding ourselves what CTEs and subqueries are and how they differ. Common Table Expressions vs. Read more 14 Jul 2021 Jakub Romanowski SQL Track of the Season: SQL Reporting in MS SQL Server It's the best time of the year for a change! Learn something new and boost your career! This is our SQL Track of the Season: SQL Reporting in MS SQL Server! In this article, we’ll answer common questions about this track. Summer is here. Does the sun make you want to learn something new? Maybe surfing or Portuguese? Maybe you've wanted to learn crocheting all your life? Follow your dreams! Read more 13 Jul 2021 Andrew Bone What Is the SQL GROUPING SETS Clause, and How Do You Use it? GROUPING SETS are groups, or sets, of columns by which rows can be grouped together. Instead of writing multiple queries and combining the results with a UNION, you can simply use GROUPING SETS. GROUPING SETS in SQL can be considered an extension of the GROUP BY clause. It allows you to define multiple grouping sets in the same query. Let’s look at its syntax and how it can be equivalent to a GROUP BY with multiple UNION ALL clauses. Read more 9 Jul 2021 Kamila Ostrowska Best SQL Certifications for Leveling up Your Career If you want to build and strengthen your position in the IT industry, you should look into these SQL certifications. We always encourage you to learn, to gather new skills and experience. Training is really important; without it, you will not make much progress if you want to advance in IT or specifically in the SQL industry. That said, you also need something that can validate your competencies, like SQL certifications. Read more 8 Jul 2021 Andrew Bone What Is the INSERT Statement in SQL? The INSERT statement in SQL is used to add new data to your database. This article will explain how to use it and show you practical examples along the way. When you learn SQL, you focus on getting data out of a database, working mostly with SELECT. In SQL, there are also statements that let you modify data in a database. The first one is the INSERT statement: it adds data to a table. Read more 7 Jul 2021 Martyna Sławińska Primary Key vs. Unique Key: Explaining the Differences When designing a database, we often need to decide between defining a primary key vs. a unique key. Both of them are crucial during the design and further phases of a database. They allow us to uniquely identify each row, ensure the uniqueness of values in the column(s), and more. Let’s take a deep dive to learn more. This article will go through the primary and unique keys, their functions, and features. Read more 6 Jul 2021 Tihomir Babic RANGE Clause in Window Functions: 5 Practical Examples What is a RANGE clause in SQL window functions? Five practical examples will show you how and when to use it. The RANGE clause is used quite rarely in SQL window functions. I don't know why; maybe people are not used to it. This is a shame, because it's far from a pointless clause; it can be very useful, and I'll show you that in five examples. To learn how window functions work, what functions there are, and how to apply them to real-world problems, it’s best to take the Window Functions course. Read more 2 Jul 2021 Karolina Niewiarowska How to Learn SQL Faster Struggling with learning SQL? Does it seem like you’re doing everything right, but not making progress as fast as you’d like? Don't worry, I'll help you. Here are some tips for learning SQL quickly and painlessly. Are you wondering how to learn SQL faster? If so, I’m here to help with some practical tips. And once you’ve found the right motivation and the right sources of knowledge, you’ll be able to learn faster. Read more 1 Jul 2021 Jakub Romanowski Free Course of the Month: SQL Server Recursive Queries Do you want to become a SQL expert? To do this, you need to learn SQL CTEs or Common Table Expressions. They can make your queries clearer and more readable. And during July 2021, you can learn CTEs for free using our interactive Recursive Queries in MS SQL Server course! How can you get this free SQL course? Create a free LearnSQL.com account or log in if you already have one. Read more 30 Jun 2021 Zahin Rahman Top 15 SQL Interview Questions in 2021 If you are on the lookout for a job in the field of data, you’re almost guaranteed to face SQL interview questions. You might even be asked to complete some kind of SQL coding test. According to KDnuggets, irrespective of the specific role in data – data analyst, data engineer, data scientist, or business intelligence analyst – SQL lands in the top three skills found in postings across Indeed, SimplyHired, and Monster. Read more 29 Jun 2021 Kate Stolarek Skills Every Data Analyst Should Have Updated on: June 26, 2024 If you’re a specialist seeking new job opportunities or a student looking for career advice find out if a data analyst job is something worth considering. In today's article, I explain the essential data analyst skills needed for success in the field and the benefits that come from performing such a job. Choosing a career can be tough, and it's normal to feel unsure. If you're reading this, you're probably in that spot right now. Read more 25 Jun 2021 András Novoszáth Data Analyst vs. Data Engineer: A Full Comparison Updated on: June 17, 2024 Do you want to become a data analyst? Or maybe you dream about being a data engineer? Can't make up your mind? I'll help you. Read about the two roles’ history, their market situation, and the skills you need to become one in this data engineer vs data analyst comparison. You already know that it's a good idea to enter the data world and work with databases. Read more 24 Jun 2021 Jakub Romanowski New Basic SQL Practice Course on LearnSQL.com Hey, did you hear that there’s a brand-new Basic SQL Practice course on LearnSQL.com? This is a great opportunity to refresh your SQL, write some queries, and take your analytical skills to the next level. We’re proud to introduce Basic SQL Practice: A Store! Where did the idea for this new SQL practice course come from? From our users! They’ve let us know that they need more hands-on SQL exercises at a beginner level. Read more 23 Jun 2021 Kateryna Koidan Do You Need to Learn SQL To Become a Programmer? Updated on: June 19, 2024 SQL is primarily used by database administrators (DBAs), business analysts, and data analysts. But what about other programming roles? In this article, I’ll show how software engineers, web developers, and app developers use SQL and why you need to learn SQL to become a programmer. Like many other aspiring programmers, you are probably wondering “Do I need SQL?”. To answer this question, you should know that you’ll encounter data everywhere in software development. Read more 22 Jun 2021 Himanshu Kathuria Why Does Your Company Need Data Analysis? Updated on: June 22, 2024 Data is the new gold. That is what the biggest in the business say, knowing the value of the data, the analyses, and the conclusions they bring. If you are wondering why your company needs data analysis and what value it could bring to your business, this article is for you. Many companies have used financial data analysis to boost revenue, cut costs, and increase profits. Read more 18 Jun 2021 Martyna Sławińska An Overview of PostgreSQL Data Types It’s vital to know what you actually store in your database. That’s why every column has its data type. There are numerous PostgreSQL data types across various categories. Read on to see which data type suits which use case! In this article, we’ll go through the most common data types used in PostgreSQL. PostgreSQL, also called Postgres, is a well-known open-source object-relational database management system (DBMS). It is SQL-compliant, extensible, and includes all standard relational database features, such as database constraints, transactions, views, triggers, stored procedures, and more. Read more 17 Jun 2021 Kamila Ostrowska SQL Terms Beginners Should Know - Part 4 Here it is – another batch of must-know SQL terms. In the first two parts, we covered tables, relational databases, queries, aliases, SQL JOINs, primary keys, and subqueries. Last time, we moved to more advanced terms like INSERT INTO, GROUP BY, and HAVING. Are you ready to dive deeper into SQL terminology? This is the fourth installment of our series on basic SQL terms for beginners (and everyone else). Don’t worry if you missed the previous articles; you can find Part 1 (essential SQL terms), Part 2, and Part 3 in our blog. Read more 16 Jun 2021 Tihomir Babic Business SQL: How to Calculate Revenue Growth in SQL Can you use SQL in business? Of course you can! For example, you can calculate revenue growth in SQL – here’s how. As someone who works with data, you already know that SQL is the most used tool in data analysis. But how is SQL helpful in business use? Well, the answer is obvious: analyze business data using SQL! However, there are some specifics with business data that can be tricky if you’re not used to it. Read more 15 Jun 2021 Jakub Romanowski I Took the SQL Basics Course... Here's What Happened! In this article, I will share my personal story with you. But don't worry – it's not about a scandal or a sad story of failure. I'll tell you how a successful news journalist fell in love with SQL. It all started when I took the SQL Basics course at LearnSQL.com. There are moments in life that change everything. Mine happened when I decided to give up my long-term career and start a completely new chapter in my professional life. Read more 10 Jun 2021 Tihomir Babic How to Draw Pictures with Recursive SQL Queries Did you know that SQL can be used for fun? You can even ‘draw’ in SQL using recursive queries! Find out how in this article. As an SQL user, you already know this language is great for data analysis and data manipulation in general. This is something people get very serious about. But you can also have fun with it by drawing ASCII-art pictures using the SQL code. To do that, you have to know how recursive SQL queries work. Read more 9 Jun 2021 Kateryna Koidan 4 Ways to Learn Which JOIN to Use in a SQL Query You probably already know that you should use JOIN to combine data from several tables. But what kind of JOIN? In this article, I’ll introduce four simple ways to finally learn which JOIN to use in different scenarios. Before we jump into smart strategies for learning SQL JOINs, I suggest taking a brief overview of the major JOIN types. We’ll go through several examples to recall the difference between (INNER) JOIN, LEFT (OUTER) JOIN, RIGHT (OUTER) JOIN, and FULL (OUTER) JOIN. Read more 8 Jun 2021 Karolina Niewiarowska Free Online Courses You Should Take If You Use SQL If you are an SQL enthusiast, already work with SQL, or want to learn it – you'll surely be interested in acquiring new skills that will support your growth. These free courses will increase your productivity, help you find your way around the work environment, and help you become a better analyst. By the way, they are also fun. Whoever said learning new things is easy has never tried to learn quantum physics (thank you, Mr. Read more 4 Jun 2021 Andrew Bone How the Division Operator Works in SQL The division operator in SQL is used to divide one expression or number by another. This article will show you exactly how to use it and common mistakes to avoid along the way. The best way to practice SQL is our interactive SQL Practice track. It contains over 600 hands-on exercises that conver varios SQL topics, from simple one-table queries, through JOINs, to complex topics like subqueries. It lets you train your SQL skills on real business examples. Read more 2 Jun 2021 Karolina Niewiarowska A Brief History of MS SQL Server Microsoft SQL Server is one of the best database management systems in the world. It’s constantly improved and widely used. But do you know how it was created? In this article, I’ll show you the history of MS SQL Server, a solution that changed the world of databases. We’ll explore the stages of MS SQL Server development, find out how the current version differs from the original, and talk about where you can learn or practice SQL Server. Read more 1 Jun 2021 Jakub Romanowski Free Course of the Month: SQL Server GROUP BY Extensions Do you create SQL reports? Do you want them to be even better and more effective? Are you working with MS SQL Server and want to expand your query writing skills? Here is a great, interactive GROUP BY Extensions in MS SQL Server course. For the month of June, you can learn and finish this course for absolutely free. How can you get this free SQL course in June? Read more 28 May 2021 Andrew Bone UNION vs. UNION ALL in SQL: What’s the Difference? UNION and UNION ALL are both used to retrieve records from multiple tables. This article will detail the differences between the two, allowing you to make the best choice for each unique scenario. You can use SQL’s UNION and UNION ALL commands to get data from multiple tables in your database. It’s a common use case, considering that most databases have many tables. Both UNION and UNION ALL are known as set operators. Read more 27 May 2021 Karolina Niewiarowska Where Can I Find a Data Analyst Internship? Updated on: May 22, 2024. Are you wondering how to land a data analyst job without any professional experience? This article is the answer! A key step in this journey is securing a position as a data analyst intern, which will be the focal point of our discussion. Finding an SQL-related internship – an important part of eventually landing a data analyst job. Internships enrich your CV and, more importantly, help you learn SQL from the practical side. Read more 26 May 2021 Ignacio L. Bisso How to Compute Year-Over-Year Differences in SQL How did your business do this year compared to last year? The year before? Find out how to use SQL to calculate year to year and month to month differences. Year-over-year (YOY) comparisons are a popular and effective way to evaluate the performance of several kinds of organizations. Year to year differences are easy to understand – e.g. it’s easy to understand that your revenue growth is 35% year to year. Read more 25 May 2021 Karolina Niewiarowska How to Keep Focused While Learning SQL Updated: April 29, 2024 Learning SQL can be a challenge, but it’s one you can handle! I’ve prepared 5 tips to help you stay focused during your learning journey. By choosing the right methods and tricks, you can achieve your goals! If you’re interested in learning SQL, I bet that you are a very ambitious person who wants to constantly develop. You may even be taking your first steps in your career. Read more 21 May 2021 Tihomir Babic 8 Best SQL Window Function Articles Do you need a starting point for learning SQL window functions? Not sure which articles provide a solid foundation? We dove into the internet rabbit hole and found the eight best articles dealing with window and analytic functions. There are plenty of articles dealing with SQL window functions. Type those words into Google and you’ll find a huge number of articles returned. Reading articles is a good start if you want to learn something about window or analytic functions in SQL – provided, of course, that the articles you choose are trustworthy and up to date. Read more 20 May 2021 Martyna Sławińska What’s the Difference Between UNIQUE and DISTINCT in SQL? We use the words unique and distinct interchangeably in our day-to-day life. However, these words play very different roles in SQL. Let’s find out what is so different about them and how we can use them in SQL. Despite the words unique and distinct being synonyms, they cover very different things in SQL. The UNIQUE keyword in SQL plays the role of a database constraint; it ensures there are no duplicate values stored in a particular column or a set of columns. Read more 19 May 2021 Tihomir Babic What Is Advanced SQL? Updated on: May 30, 2024 Are you confused about advanced SQL skills? What are they? This article will explain what advanced SQL can mean, especially as we use it on LearnSQL.com. I’m sure you find the phrases ‘advanced SQL skills’ or ‘advanced SQL topics’ very often. You read one article about advanced SQL and you’re happy with how easy these advanced topics seem to be. Then you talk to someone and you see they consider everything you know as basic SQL knowledge. Read more 18 May 2021 Andrew Bone How to Use Aliases in SQL Queries An SQL alias is useful for simplifying your queries and making the query and its result more readable. This article explains why and how you can use aliases in your SQL queries. You can temporarily rename a table or a column by giving it another name. This is known as an SQL alias. It’s a temporary change that does not affect the actual table name in the database. A temporary table name can also be called a correlation name. Read more 14 May 2021 James Wondrasek How to Use Comparison Operators with NULLs in SQL The SQL NULL value serves a special purpose. It also comes with counterintuitive behaviors that can trip up SQL beginners or even experienced programmers. Learn how to avoid these problems when you use NULL with comparison operators. This article is going to help you master best practices for crafting SQL queries that work with NULL values and use comparison operators ( =, <>, <, > ) – which, if you have written any SQL queries before, you know is just about every query you will ever write! Read more 13 May 2021 Kateryna Koidan A Detailed Guide to SQL ORDER BY It’s often necessary to display the output of SQL query in specific order rather than arbitrarily. In this article, I’ll explain the many ways you can do it with the SQL ORDER BY clause. To sort records in SQL, you’ll need to use the ORDER BY clause. In this article, I’ll explain in detail how to use ORDER BY to sort output by one or more columns, in ascending (A-Z) or descending (Z-A) order, and by using existing column(s) or using column(s) calculated by an aggregate function. Read more 12 May 2021 Kamila Ostrowska The Best Books for Data Engineers Updated on: May 6, 2024 Getting tired of the endless screen glare? It might be a good time to switch to a book. Dive into our selected list of books for data engineers, perfect for expanding your insights on databases. It’s a refreshing change from the digital routine! Last time, I shared a list of the best books to learn SQL. This time, I want to introduce a few books for data engineers. Read more 11 May 2021 Karolina Niewiarowska Best Online SQL Courses for 2021 In this pandemic era, it's no surprise that online learning has become even more popular. To help you narrow things down, I’ve prepared a list of 2021’s 10 best online SQL courses. Find out where you can learn SQL effectively! The number of online courses on offer – especially in the tech industry – is now impressive. You can find something that suits your interests, competences, and professional ambitions. But how do you know which to choose among the many online SQL courses out there? Read more 7 May 2021 Zahin Rahman What Is the WITH Clause in SQL? Updated on: June 25, 2024 In this article, you will learn about the SQL WITH clause, also known as common table expression (CTE). We will go over some examples to demonstrate some of their use cases in light of their benefits. Today, I'm here to guide you through the intricacies of the SQL WITH clause, commonly known as Common Table Expression (CTE). If you've faced challenges with lengthy and complex SQL queries, this article will be particularly useful. Read more 6 May 2021 Jakub Romanowski Want to Work With Data? Learn SQL! Are you looking for a database job? How are things working out? If you don't know what to do, I suggest you start by learning SQL. Here’s why. In this article, I’ll explain how you can succeed at finding a database job. If you are tired of your current job and fed up with your boss (who hasn't given you a raise in years), read on. Stay with me too if one more stupid Zoom call will make you scream. Read more 5 May 2021 Kateryna Koidan A Guide to SQL Common Table Expressions Common table expressions are a relatively new SQL feature that is sometimes overlooked by experienced practitioners working with relational databases. Don’t be one of them! Learn how to use SQL CTEs and join the many data analysts enjoying the benefits of this great tool. Common table expressions (CTEs), also known as WITH clauses, are used to create named subqueries that can be referenced in the main query. CTEs are not saved for future use and can be referenced only within the query where they are defined. Read more 4 May 2021 LearnSQL.com Team SQL Course of the Month – SQL Practice Set Are you starting your adventure with SQL and looking for a place to practice your SQL queries? Or maybe you are preparing for a job interview? I have good news for you. Throughout May, you will have access to our amazing SQL practice course for FREE! Why is LearnSQL.com giving you a free SQL course? Every month, our users get the opportunity to take one of our great SQL courses for free. Read more 29 Apr 2021 Ignacio L. Bisso Why Do You Need a Primary Key in a Database Table? What is a primary key and why is it so important in SQL? Find out in this article. Primary keys are a central element in SQL databases. They provide a unique value that can identify a specific row in a table, which opens up a lot of other benefits. This article covers what a primary key is, how it works, and how to use it in an SQL database. Read more 28 Apr 2021 LearnSQL.com Team Breaking With Filing Cabinets: The History of PostgreSQL This July, PostgreSQL turns 25. It has had an extensive influence on computing. Thanks to PostgreSQL, the world said “Goodbye!” to filing cabinets as the standard for storing and processing data. So, who created PostgreSQL, and how has it changed over the decades? There are quite a few PostgreSQL enthusiasts among my colleagues at LearnSQL.com. It is simply a great database solution. Why? It is free and open-source. So, you can use it for free, even for commercial uses. Read more 27 Apr 2021 Martyna Sławińska What Is the Benefit of Foreign Keys in SQL? What is a foreign key and why is it so important in relational databases? Learn all the details about foreign keys in this article. One of relational databases’ key features is the ability to link data stored in different tables. These links, called references, essentially act as connections between tables. They are created using the FOREIGN KEY constraint on table columns. In this article, we’ll learn what the FOREIGN KEY constraint does in SQL. Read more 23 Apr 2021 Andrew Bone What Is the Role of DISTINCT in SQL? The DISTINCT keyword in SQL plays an important role in removing duplicate values from your results. This article provides examples showing exactly how DISTINCT works. By default, SQL queries show all the returned rows, including duplicate rows, in the result set. The DISTINCT keyword in the SELECT clause is used to eliminate duplicate rows and display a unique list of values. In other words, the DISTINCT keyword retrieves unique values from a table. Read more 21 Apr 2021 Andrew Bone What Do the SQL INTERSECT and MINUS Clauses Do? Do you know the difference between SQL’s INTERSECT and MINUS clauses and how to use them? You will find examples and explanations in this article. SQL INTERSECT and MINUS are useful clauses for quickly finding the difference between two tables and finding the rows they share. INTERSECT compares the data between tables and returns only the rows of data that exist in both tables. MINUS compares the data between tables and returns the rows of data that exist only in the first table you specify. Read more 20 Apr 2021 Tihomir Babic Hierarchical Data and How to Query It in SQL How do you recognize hierarchical data, and how do you query it? Two common SQL questions are about to be answered. Querying hierarchical data is a rather common situation if you’re working with SQL and relational databases. Not that hierarchical data is something mystical and rare; on the contrary, it’s everywhere. So why is hierarchical data so challenging when it comes to relational databases? Mainly, the difficulties occur in translating hierarchical data to relational database principles. Read more 16 Apr 2021 Himanshu Kathuria Analyze Small Datasets with SQL If you think SQL data analysis is useful only when a business is generating millions of rows of data – that SQL cannot help you if you are generating a limited dataset – think again and read on! There is so much talk about how SQL is useful in analyzing Big Data that sometimes the applications of SQL data analysis for small datasets can go unnoticed. Having worked with early-stage businesses – which have just started generating data through daily transactions – as well as big established clients generating terabytes of data, I can tell you for sure that SQL can be an extremely handy tool for just about any business. Read more 15 Apr 2021 Karolina Niewiarowska Does Music Improve Work Efficiency? Updated on: April 15, 2024 Do you sometimes have trouble focusing when working or studying SQL? Do you ever lack motivation? I have the perfect solution for you: music for learning SQL! I am excited to tell you about how the right tunes can significantly enhance your efficiency and concentration. Music can soothe the savage beast, they say. It can also inspire action. In general, music is an important element of human life. Read more 14 Apr 2021 Kamila Ostrowska Who Should Learn SQL? If you learn SQL, will you use it in your current (or dream) job? If you learn it, will it help you with your daily tasks? SQL has so much potential that everyone can benefit from it – including you! Read this article to find out how much you will gain by knowing SQL. I could answer the title question with one word: everyone! But not everyone wants to learn SQL. Read more 13 Apr 2021 Zahin Rahman What FULL JOIN Is and When to Use It Learn about FULL JOIN, how to implement it, how it compares with the other types of SQL JOINs, and some of its unique use cases. Before we jump into FULL JOINs, let’s quickly recap what an SQL JOIN is. At its core, a JOIN combines data from two or more tables within a database. Tables are usually linked together using unique identifiers in each table, i.e. primary and foreign keys. Read more 9 Apr 2021 Kateryna Koidan 7 SQL JOIN Examples With Detailed Explanations Do you need to join several tables to get the necessary result set? The SQL JOIN is a basic yet important tool used by data analysts working with relational databases. And I understand it can be difficult to choose from the zillions of introductory guides to joins. In this article, I will focus on real-world examples with detailed explanations. Introduction to JOIN With relational databases, the information you want is often stored in several tables. Read more 8 Apr 2021 Zahin Rahman SQL CTE Explained In this article, you will learn about SQL Common Table Expressions (CTEs). This powerful SQL tool will help you simplify complex queries. Additionally, I will introduce you to the two main types of CTEs and some of their use cases. CTE Primer The Common Table Expression (CTE) was introduced to standard SQL to simplify long, complex queries (especially joins and subqueries). It is a temporary data set returned by a query that contains data separate from the main query. Read more 7 Apr 2021 Jakub Romanowski SQL Track of the Season: SQL Fundamentals in PostgreSQL Are you ready for a new challenge this spring? Check out our SQL Track of the Season: SQL Fundamentals in PostgreSQL! In this article, we’ll answer common questions about this track. It’s getting warmer. The flowers are slowly beginning to bloom. This can mean only one thing – spring is here. The world is coming to life after its wintertime lethargy. This is a great time for new challenges. Do you want to add something to your skillset? Read more 6 Apr 2021 Tihomir Babic How to Find the Next Non-NULL Value in SQL You need to find the next non-NULL value in a time series, but you don’t know how. Can you even do that in SQL? Yes, you can! This article will show you what to do. If you work with SQL, you will sooner or later confront NULL values. Having NULLs in a database is almost unavoidable. However, sometimes you want to avoid them in your reports. This is quite often true when you’re analyzing time series data; NULL values mean there’s no data available. Read more 2 Apr 2021 Kateryna Koidan What Is the RANK() Function in SQL, and How Do You Use It? Who are your top 10 customers? Who are the top-performing employees in each department? To answer questions like these, you’ll need to rank the output of your SQL query. Let’s see how the RANK() function assists with ranking results in SQL. There are many use cases in which you might need to rank rows in SQL. You may want to rank customers based on the sales volume, students based on their exam results, company assets based on their present value, departments based on the number of employees, or users based on their date of registration. Read more 1 Apr 2021 Jakub Romanowski Free SQL Course of the Month – Creating Basic SQL Reports Do you want to create good SQL reports from scratch? Are you looking for a course that will help you spread your analytical wings? What if I told you that throughout April 2021, you could access one of the best SQL Reports courses for FREE? Here it is: Creating Basic SQL Reports. What's the catch? There is none. LearnSQL.com provides one of their courses for free from time to time. Read more 31 Mar 2021 Andrew Bone What Is CASE in SQL? SQL CASE is a very useful expression that provides if-else logic to your SQL queries. It’s a slightly more advanced topic, but you’ll need it when preparing reports – it will deliver massive value to your personal and professional projects. The SQL CASE statement is a control flow tool that allows you to add if-else logic to a query. Generally speaking, you can use the CASE statement anywhere that allows a valid expression – e. Read more 26 Mar 2021 Dorota Wdzięczna How to Install MS SQL Server 2019 on Windows Do you want to install SQL Server 2019 on your Windows PC? How about the latest version of SQL Server Management Studio? I’ll walk you through the process. Soon you’ll be writing T-SQL queries and operating on SQL Server databases! As I write this article, Microsoft SQL Server 2019 is the latest version of SQL Server. It’s the 15th version of one of the most popular database servers in the world. Read more 25 Mar 2021 Jakub Romanowski Is MS SQL Server Still Worth Learning in 2024? Updated on: March 10, 2024 MS SQL Server is an in-demand skill in today’s job market. Should you learn MS SQL Server in 2024? In this article, I’ll answer this question. Thinking about whether you should dive into Microsoft SQL Server in 2024 – especially with so many free database alternatives available? MS SQL Server has been a go-to for handling data for ages, thanks to its solid features and reliability. Read more 24 Mar 2021 Ignacio L. Bisso What Is a NOT NULL Constraint in SQL? SQL has several ways of dealing with NULLs. In this article, we’ll focus on the NOT NULL constraint and other NULL-related clauses. Understand this and you’ll take an important step in your SQL growth! Before we get straight into the NOT NULL constraint, let’s quickly define what NULLs and constraints are. NULL values are a central concept in SQL databases. The idea behind a NULL value is simple: a NULL value means that we do not have a known value for that field. Read more 23 Mar 2021 Kamila Ostrowska Best SQL IDEs for You Maybe you just started learning SQL. Maybe you already have some experience. Whatever your situation is, choosing the right IDE for you is another step in your development. Why IDE? IDE stands for integrated development environment. It is a software application that enables us to combine various aspects of writing a computer program. An IDE usually contains a source code editor, build automation tools, and a debugger. You might ask why you need an IDE when you have the command line available on your computer. Read more 18 Mar 2021 Jakub Romanowski New SQL Course: GROUP BY Extensions in PostgreSQL Do you want to take your knowledge of PostgreSQL to the next level? I have something for you: LearnSQL.com’s new GROUP BY Extensions in PostgreSQL course! It will help you get even more out of your data and create better reports and summaries. Fasten your seat belts and prepare to see what GROUP BY can do when it’s turbocharged. First, I have to confess something. I am not objective – I think PostgreSQL is the best and coolest SQL dialect. Read more 17 Mar 2021 Gustavo du Mortier What Is a NULL in SQL? SQL uses NULLs as a special flag that signals the lack of a value for a field or a variable. NULLs should be used wisely so the database gives a faithful picture of the reality it represents. Some people associate NULLs with zeros; others think that NULL means “none”. In SQL, neither of these are true. Simply put, an SQL NULL means that we don’t have a value for that particular field. Read more 12 Mar 2021 Tihomir Babic SQL JOIN Topics That Require Practice Are you interested in learning how to join tables in SQL? Where do you start? Many JOIN topics require practice. In this article, we’ll explore these topics by writing codes to solve real-life situations. Hopefully, you will learn which JOIN topics require attention. To make it easier for you, the topics are divided into beginner, intermediate, and advanced. Joining two or more tables in SQL lifts data analysis to another level. Read more 10 Mar 2021 Jakub Romanowski Where Can I Find Good Courses to Practice MS SQL Server? Updated on: April 6, 2024 Begin your journey to mastering MS SQL Server with the finest practice exercises out there. Whether you are a beginner or seeking to improve your T-SQL skills, explore the top destinations for the most engaging and interactive MS SQL practice courses online. You've started learning MS SQL Server. Maybe you've done a course, watched some YouTube tutorials, and feel pretty confident in your knowledge. What now? Read more 9 Mar 2021 Kateryna Koidan Why the SQL WITH Clause Is Awesome If you’re not using WITH clauses yet, it’s definitely time to start! SQL WITH clauses, or common table expressions, help improve the structure of SQL queries by making them more readable. That’s already a lot, but WITH clauses have many more benefits. Let’s see together! The WITH clause was introduced in SQL:1999 to define views that are only valid for the query they belong to. Also known as common table expressions (CTEs), WITH clauses allow us to improve the structure of an SQL statement without polluting the database namespace. Read more 5 Mar 2021 Tihomir Babic How to Get Descendants of a Parent in SQL Want to learn how to handle family trees and find descendants of a parent? By reading this article, you’ll learn how to handle hierarchical data. Finding descendants from a parent is a common problem in SQL. If you imagine a family tree, the basic building block that forms the relationships within it is the parent-child relationship. The parent-child relationship is precisely what defines all hierarchical data. Another example of hierarchical data is the manager-employee relationship. Read more 4 Mar 2021 Andrew Bone What Do the Operators LIKE and NOT LIKE Do? The SQL LIKE and NOT LIKE operators are used to find matches between a string and a given pattern. They are part of standard SQL and work across all database types, making it essential knowledge for all SQL users. Gaining an understanding of these operators will allow you to write better queries and demonstrate to potential employers that you have the skills required to filter through expansive data sets. Read more 3 Mar 2021 Kateryna Koidan How to JOIN Tables in SQL Do you need to display data stored in different tables? Then it’s time to use SQL JOINs! This can be a challenging topic for beginners, so I’ve prepared this comprehensive step-by-step guide on joining tables in SQL. Often, the information that you want to display is stored in several tables. In such cases, you’ll need to join these tables by specifying which rows should be combined with other rows. That’s exactly what JOIN does. Read more 1 Mar 2021 LearnSQL.com Team Free SQL Course of the Month – Window Functions Are you looking for a good SQL window functions course? What if I told you that throughout March, you could access the best window functions course in the world for absolutely FREE? You read that right: you won't pay a dime! Hurry up! Time is running out! But wait – why is LearnSQL.com giving you a free SQL course? Well, we believe sometimes you just have to be good to others. Read more 26 Feb 2021 Martyna Sławińska MS SQL Server vs. PostgreSQL: Which to Choose? Choosing the DBMS you will use for a new project is a very important and difficult decision. Two popular choices are MS SQL Server and PostgreSQL. To help you decide which would be best for you, I'll compare their features, list pros and cons, and give you some examples. Your selection of database management system (DBMS) depends on the type of business or project you're implementing. First, you need to know: Read more 25 Feb 2021 Timothy Edison How Much SQL Practice Do You Need to Become a Pro? Are you wondering how long it will take to learn and practice SQL before you can call yourself a pro? In this article, I will try to help you answer this question. Being a pro in SQL can mean many different things. Some people would say that being a professional is about mastery of advanced SQL, i.e. window functions or complex subqueries. For other people, being a professional means getting paid for your skills. Read more 24 Feb 2021 Jakub Romanowski SQL Terms Beginners Should Know - Part 3 This is the third part of my list of essential SQL terms for beginners. In the first, you learned what tables, relational databases, and queries are. In the second part of the tutorial, I told you about aliases, SQL JOINs, primary keys, and subqueries. Now, it's time for more advanced database terms. But don't be afraid! I won’t crush you with scientific definitions. I will explain everything simply so that you can easily understand. Read more 23 Feb 2021 Kate Stolarek How to Use SQL to Filter Your Client Email Database Looking for ways to be on friendly terms with your email database? Here's my way of using SQL to evaluate a promotion. A client database plays an essential role in developing your sales and marketing strategies. Having a clear and well-structured database has several benefits. For example, you can increase your company's revenue by managing your current and new clients – they can be monitored and offered special promotions. Moreover, such an effort develops customer satisfaction and increases value for your current customers. Read more 19 Feb 2021 Karolina Niewiarowska Learn SQL And Start Your Journey Towards Personal Growth Are you at the very beginning of your career and don't know what employers are looking for? Maybe you already have a lot of experience, but feel like it's time to change or update your skillset. Learning SQL can be a great choice. Read on and find out why. Regardless of your career stage, you cannot neglect your personal development. Whoever does not move forward falls behind. As you start learning new things, new opportunities will open up for you, both in your personal and professional life. Read more 18 Feb 2021 Kamila Ostrowska How to Practice PostgreSQL Online PostgreSQL is hot right now!If you want to join a community of people passionate about data, this open-source database system is something you need to try. Like everything we teach on LearnSQL.com, PostgreSQL requires practice. To profit from Postgres – as this dialect is sometimes called – you need to start with the basics. You can watch some tutorials on YouTube or read articles to get to know what a Database Management System (DBMS) is. Read more 16 Feb 2021 Marija Ilic What Is GROUP BY in SQL? GROUP BY is a great SQL feature that allows you to perform powerful calculations on grouped data. Do you want to learn how to get powerful insights from your data? Would you like to know what GROUP BY does and when you should use it? If your answer is yes, keep reading. In this article, you will learn exactly that. Why You Need GROUP BY In today's digitized world – no matter what business you are in – database tables are usually huge, with millions of records. Read more 12 Feb 2021 Tihomir Babic 6 Advanced SQL Queries for Analyzing Financial Data Are you an advanced SQL user who’s new to finance? Do you want to learn how to use your knowledge to analyze financial data? The article will give you some guidance. You probably know that SQL is a potent tool for analyzing all sorts of data. The bigger and more complex data, the more beneficial SQL becomes. In certain situations, financial data can be very complicated; producing a sophisticated analysis requires sophisticated tools. Read more 11 Feb 2021 Kateryna Koidan Enumerate and Explain All the Basic Elements of an SQL Query “What are the basic elements of an SQL query?” is a popular SQL job interview question. In this article, we review the basic syntax of an SQL query. An SQL query, which requests information from a relational database, consists of several elements. These allow you to select specific columns from specific tables and to filter and sort this information if necessary. In this article, I’ll briefly review these elements by explaining what each element does and how to use it. Read more 10 Feb 2021 Tihomir Babic Want to Learn Advanced PostgreSQL? Try This! Why and how should you learn advanced PostgreSQL? I’ll give you some tips that will help you achieve your goals. Keeping up with technology is hard; anyone who has foolishly tried to do so can confirm this (me, for example!). Most of the time, it just doesn't work. And to be brutally honest, keeping up with all the technologies all the time is pointless. You shouldn’t know everything about everything; it’s better to know as much as you need within the technology you use or want to use. Read more 9 Feb 2021 Kateryna Koidan What Does ORDER BY Do? When analyzing data, it often helps to have rows ordered in a specific way. In this article, I’ll use multiple examples to show how SQL ORDER BY sorts data according to one or more columns in ascending or descending order. Introduction to ORDER BY By default, the order of rows in the output of an SQL query is arbitrary. If you want to sort the output in a particular order, you’ll need to use the ORDER BY keyword. Read more 5 Feb 2021 Jakub Romanowski How to Import CSVs to PostgreSQL Using PgAdmin Do you work with data and use CSV files? Here is a practical guide on how to import such files into a PostgreSQL database using pgAdmin, one of the best PostgreSQL editors on the market. Let's get right into importing CSVs into a Postgres database. We’ll start by explaining what a CSV file is, then we’ll introduce you to pgAdmin and show you how to do the import process. Don’t worry – it’s easy! Read more 4 Feb 2021 Martyna Sławińska What Is a Unique Constraint in SQL? To ensure the uniqueness of data in a database, we use the SQL UNIQUE constraint. In this article, we’ll discuss how, when, and why to implement it. The idea of a unique constraint is not unique to SQL; it’s a familiar concept in real life, although we probably call it something else! For example, think of ID numbers. There can be only one social security number (SSN) per person and each one must be unique. Read more 3 Feb 2021 Rebecca McKeown How Much SQL Do I Need to Know? Learning a new skill or starting a new profession can be a real challenge, especially when you’re unsure of how much you really need to know before taking the plunge. Imposter syndrome is also a real thing – how could you possibly catch up with all those SQL ‘experts’ who seem like they’ve been doing this since they were in diapers? The good news is you can learn SQL quickly and easily, and you don’t need to know nearly as much as you think you do. Read more 2 Feb 2021 LearnSQL.com Team SQL Course of the Month – SQL JOINs If you want to really learn SQL, you can’t skip SQL JOINs. They are some of the most fundamental and commonly used features of the SQL language. That’s why SQL JOINs is our February SQL Course of the Month. What makes SQL JOINs so important? I asked Agnieszka Kozubek-Krycuń, Vertabelo's Chief Content Officer, about it. Here's what she said. Is it true that SQL JOINs are one of the foundations of SQL? Read more 29 Jan 2021 Ignacio L. Bisso Data Types in SQL Read this article and learn the ABC of SQL data types. Data types are used to define the type of data stored in a database. However, there are related concepts that a good SQL developer should know: data type conversion, what operations are possible between different data types, date arithmetic, etc. SQL also provides functions that manipulate values of different data types (i.e. functions for string data, date and time data, etc. Read more 28 Jan 2021 Andrew Bone Using AND, OR, and NOT Operators in SQL AND, OR, and NOT are important logical operators in SQL. They help you combine the conditions used to filter records. They are most commonly used in conjunction with the WHERE or HAVING clauses. Furthermore, this topic is a pretty common SQL job interview question. To help you completely understand these operators, I’ll take you through some examples, fully explaining the syntax and purpose of each. Practicing using examples like these is one of the best methods for learning SQL. Read more 27 Jan 2021 Agnieszka Kozubek-Krycuń Why Aren’t SQL Window Functions Allowed in GROUP BY? It’s true – the SQL order of operations means window functions aren’t allowed in GROUP BY. But you can use them anyway with this special trick. SQL window functions are one of the language’s most powerful features. However, the syntax of window functions is not easy to master. It has lots of details that can cause beginners to stumble. One of the most common traps is trying to use window functions in GROUP BY. Read more 26 Jan 2021 Marija Ilic 7 Common GROUP BY Errors Are you making these errors with GROUP BY in SQL? Find out what they are, how to avoid them, and how to fix them. SQL’s GROUP BY statement can quickly uncover powerful data insights. At first, using GROUP BY can seem easy – e.g. when creating basic SQL reports that you’ll present to business decision-makers. But while learning this powerful feature, you could become trapped in weird errors or get incorrect results caused by improperly written GROUP BY statements. Read more 24 Jan 2021 How to Delete a Foreign Key Constraint in SQL Problem: You want to delete a foreign key from a table in a database. Example: We want to remove the foreign key named fk_student_city_id from the table student. Solution: ALTER TABLE student DROP CONSTRAINT fk_student_city_id; Discussion: To delete a foreign key from a table, use the ALTER TABLE clause with the name of the table (in our example, student) followed by the clause DROP CONSTRAINT with the name of the foreign key constraint. Read more 24 Jan 2021 How to Create a Table with a Foreign Key in SQL Problem: You want to create a foreign key for a table in a database. Example: We would like to create a table named student that contains a foreign key that refers to the id column in the table city. Solution 1: Creating new table with single-column foreign key CREATE TABLE student ( id INT PRIMARY KEY, first_name VARCHAR(100) NOT NULL, last_name VARCHAR(100) NOT NULL, city_id INT FOREIGN KEY REFERENCES city(id) ); Discussion: To create a new table containing a foreign key column that references another table, use the keyword FOREIGN KEY REFERENCES at the end of the definition of that column. Read more 22 Jan 2021 Zahin Rahman Why Learn SQL Window Functions in 2021? SQL window functions provide some extremely powerful and convenient features for data practitioners. This article explains why you should learn window functions and when you should use them. I’ll also provide some examples to help you visualize the concepts. Window functions are part of advanced modern SQL – knowledge of which will definitely enrich the repertoire of any SQL user. Window functions have a broad range of uses and can be applied to almost all facets of business. Read more 21 Jan 2021 Zahin Rahman Where Can I Find Good SQL CTE Exercises? Find the top online resources for SQL Common Table Expression (CTE) exercises! CTEs allow you to structure and organize SQL queries efficiently, which is essential if you want to advance your SQL knowledge. A Common Table Expression, or CTE, is a SQL syntax that creates a temporary data set. This set contains separate data than the main query, which can typically be referenced or reused in a subsequent query. A CTE is considered temporary because the result is not permanently stored anywhere and only exists for the duration of the query. Read more 20 Jan 2021 Jakub Romanowski Stories of the LearnSQL Scholarship Program 2020 is behind us. It was an extremely difficult year: We’ve struggled with the Covid-19 pandemic, a worldwide economic crisis, and constant anxiety. Many people have lost their jobs and their prospects for a better tomorrow. That's why we decided to do something positive: establishing a SQL scholarship program. We decided to find people in difficult situations and try to help them. For many, learning SQL can be their chance to get a job and develop their career. Read more 19 Jan 2021 Andrew Bone What Is the SQL WHERE Clause? The WHERE clause is a fundamental part of SQL. This clause filters results and applies conditions to SQL queries. It is most commonly used alongside the SELECT statement. If you’re a complete newcomer to this topic, you can learn the basics of SQL, including WHERE, in our SQL Basics course This article will clearly explain how to use WHERE in a SQL query. After reading it, you’ll have the confidence and knowledge to integrate WHERE into your daily work. Read more 14 Jan 2021 Kateryna Koidan What’s the Difference Between SQL CTEs and Views? SQL views vs. CTEs: What do they do? How are they different? Which one should you use and when? Get your answers here! In SQL, both CTEs (common table expressions) and views help organize your queries, leading to cleaner and easier-to-follow code. However, there are some important differences between them. This article will walk you through several examples of CTEs and views and explain when to use each one. Read more 14 Jan 2021 Agnieszka Kozubek-Krycuń Monthly SQL Challenges in 2021 Did you know that LearnSQL.com provides a monthly SQL Challenge? Every month, we publish a new set of SQL practice exercises. Find out what to expect from our SQL challenges in 2021. Here at LearnSQL.com, we believe that the best way to learn SQL is through practice. After all, writing SQL is a practical skill. That’s why all our SQL courses (and there are over 30 of them!) are interactive: You learn SQL by writing SQL code. Read more 13 Jan 2021 Kateryna Koidan What Is LEFT JOIN in SQL? Get to know the details of LEFT JOIN, one of the most common SQL JOIN types. SQL is mainly about getting data from databases. Very often, you’ll need data to be combined from multiple tables in your database. That’s when JOINs come into play. LEFT JOIN is one of the JOIN types that you are likely to use very often. In this article, I’ll explain the syntax of LEFT JOIN and how it works using several examples and illustrations. Read more 12 Jan 2021 Jakub Romanowski Best SQL Video Tutorials for 2021 Ready for this year’s picks for the best YouTube SQL video tutorials? Here are our top 5 choices! It's been well over a year since I last wrote about SQL tutorials on YouTube. Those seven channels can help you learn the basics of SQL quite painlessly, but now it's time to add to that list with 2021’s top contenders. Which YouTube SQL tutorials are worth your time and attention? I’ve got my favorites, but first, let’s consider an important question: Read more 8 Jan 2021 Martyna Sławińska What Is Auto-Increment in SQL? In this article, we’ll learn the basics of the auto-increment feature of SQL: what it is and how to use it efficiently. One of the many features offered by SQL is auto-increment. It allows us to automatically generate values in a numeric column upon row insertion. You could think of it as an automatically supplied default value – the next number in a number sequence – that’s generated when the row is inserted. Read more 6 Jan 2021 LearnSQL.com Team Winter 2021 Track of the Season: Creating Database Structure New year, new challenges, and ... a new SQL Track of the Season! Start 2021 by learning SQL and data engineering. In this article, we answer frequently asked questions about our Creating Database Structure track. Maybe you haven't noticed yet that there’s an order to many LearnSQL.com courses; you can learn SQL by doing them in the right order. We call this option our ‘SQL tracks’. These are logically structured and well-thought-out learning paths that will help you take the next steps towards becoming an SQL expert. Read more 5 Jan 2021 LearnSQL.com Team SQL Course of the Month – Standard SQL Functions Are you dreaming of becoming a data analyst? Or maybe you just want to work effectively with your company’s databases? You can – with SQL functions. We’ve selected Standard SQL Functions to be our January 2021 SQL Course of the Month. What will you find inside? I asked Agnieszka Kozubek-Krycuń, Vertabelo's Chief Content Officer, about it. Here's what she said. What are SQL functions? The term reminds me of SELECT or JOIN. Read more 31 Dec 2020 LearnSQL.com Team Why Learn SQL This New Year? In answering this question, we’ll take a look at the idea behind New Year’s resolutions, explore what SQL is, and see why learning it should be your goal for 2021. We’ve all heard of New Year’s resolutions, and we all have personal experience of how difficult it can be to see them through to a successful conclusion. We’ll examine the history of New Year’s resolutions, why they often fail, and how to ensure your resolution for learning SQL in 2021 doesn’t meet with the same fate as so many others that never made it past the end of January. Read more 30 Dec 2020 How to remove a unique constraint in SQL? Problem: You would like to remove a unique constraint from the column/columns in a table in a database. Example: We would like to drop the unique constraint in the table product from the column name. The statement below shows how to do it. Solution ALTER TABLE product DROP CONSTRAINT UQ_product_name In this example the table product is altered by using the ALTER TABLE clause. After this clause you enter the name of the table (in our example: product) and the clause DROP CONSTRAINT with the name of the unique constraint you want to remove. Read more 30 Dec 2020 How to Make a Column Unique in SQL? Problem: You would like to make a column unique in a given table in a database. Example: We would like to make the column name unique in the table product. The query below presents one way to do it. Solution 1: Creating new table with a UNIQUE constraint CREATE TABLE product ( id INT NOT NULL PRIMARY KEY, name VARCHAR(100) UNIQUE, producer VARCHAR(100), category VARCHAR(100) ); Discussion: In this example a given column (the column name) was made unique by adding the clause UNIQUE at the end of the column definition (name VARCHAR(100) UNIQUE). Read more 29 Dec 2020 Jakub Romanowski 2020’s Best LearnSQL.com Articles We published a whole lot of interesting SQL articles this year. I had a difficult task – choosing the best LearnSQL.com articles of 2020. And here they are. The crazy year of 2020 is coming to an end. How will we remember it? Probably by the COVID-19 pandemic; we stayed home and fought the virus. It was a difficult time. However, many of us did not give up and kept trying to achieve our professional goals. Read more 25 Dec 2020 Ignacio L. Bisso What Is a Database Index? Database indexes are critical to query speed and efficiency. Learn when, why, and how to use them – and when not to – in this post. Indexes are very important database objects; they optimize data access and improve database performance by helping the database execute SQL queries faster. Why not take this opportunity to learn how indexes work and how to create them? What Is a Database Index? Indexes are data structures that can increase a database’s efficiency in accessing tables. Read more 23 Dec 2020 Dorota Wdzięczna What Is an SQL INNER JOIN? How do you combine data from different tables in one query? An SQL feature called JOIN is the most common operator used to create complex queries. Learn the basics in this article. SQL allows us to select data from more than one table. In fact, the whole idea of using relational databases is selecting data from related tables. And we can use SQL’s JOIN operator to do this. There are many types of JOINs in SQL. Read more 18 Dec 2020 Marija Ilic SQL Window Functions for Managers: Who Gets a Raise? Window functions are one of the most powerful features in modern SQL. In this article, you will learn why window functions are so great. I will list you the most useful window functions and briefly explain when and how you can use them. Simple SELECT statements, in combination with WHERE, GROUP BY, and HAVING, are sufficient for many analyses at work. I used standard SQL for many years before I realized there is something more. Read more 17 Dec 2020 Jakub Romanowski The Best SQL Lectures on YouTube YouTube contains a vast amount of information. The trick is to know how to find what’s valuable. If you type “SQL lectures” in the YouTube search engine, you will probably get a list of boring or unhelpful clips. However, there are hidden gems, and I’ve compiled a list of the best SQL talks I’ve found on YouTube so far. First, let's establish one thing. I didn't choose any YouTube SQL tutorials when making this list. Read more 16 Dec 2020 Zahin Rahman Best Online Courses for SQL Window Functions In this article, I will summarize the top online tutorials and courses available on SQL window functions for enthusiasts of data analysis, data science, and data engineering. The information is here to help you embrace the topic with ease and feel comfortable using window functions in SQL databases. SQL window functions can help you solve some of the most common analysis challenges in business: What are the N most popular products for each month of the year? Read more 15 Dec 2020 Tihomir Babic How to Use CASE WHEN With SUM() in SQL This article will teach you what a CASE WHEN expression is in SQL and how to use it with a SUM() function and a GROUP BY statement. The examples are included to bolster your understanding. The best way to learn about CASE WHEN and how to use it with SUM() is our hands-on course Creating Basic SQL Reports. It contains over 90 interactive exercises that will teach you different techniques how to create complex reports in SQL. Read more 13 Dec 2020 LearnSQL.com Team SQL Scholarship Program 2020 2020 is slowly coming to an end. It was extremely difficult for everyone. We’ve therefore decided to end it with something positive. This Holiday, we want to help someone change their life. Learn SQL will fund 50 SQL Scholarships for people who cannot afford to learn SQL and who may find it helpful in a difficult situation. We’ll hand out our flagship track - SQL From A to Z - for FREE! Read more 11 Dec 2020 Martyna Sławińska What is an SQL View? A view is a well-known feature in SQL. It allows you to create a virtual table based on an SQL query referring to other tables in the database. A view stores an SQL query that is executed whenever you refer to the view. This is a convenient way to get the desired data because it is easier to run a query stored in a view than to type a query from scratch. Read more 10 Dec 2020 Arleta Więch Practicing SQL for Your First Day of Work Your new SQL job is likely to surprise you in many ways. To minimize the risk of getting lost in the jungle of data, I recommend you get some additional SQL practice before your first day. There are special SQL practice sets and projects on the internet to help you prepare. You’ll also get help from your colleagues, as programmers are usually open and supportive. If you’re reading this, you’ve probably heard about the opportunities SQL and data science offer. Read more 9 Dec 2020 Andrew Bone The Top 10 SQL JOIN Interview Questions with Answers Have you ever wondered what SQL JOIN questions you might be asked in an interview? Do you feel prepared to answer them? This article covers the most common SQL JOIN interview questions and how to answer them. If you are applying for a job as a data analyst or software developer, you will likely be asked about your SQL JOIN knowledge. SQL JOIN clauses are a great topic for interviewers to quiz you on. Read more 8 Dec 2020 Agnieszka Kozubek-Krycuń The History of SQL Standards Has the SQL standard changed in the 30+ years it's been around? Absolutely! Learn about the journey from SQL-86 to modern SQL, today’s standard data language. SQL was created in the early 1970s by IBM. In 1974, Donald Chamberlin and Raymond Boyce published the article SEQUEL: A Structured English Query Language, which introduced SQL to the world. The article contained the BNF grammar (a detailed technical description of the language syntax) for the language, which IBM later thought was a mistake. Read more 4 Dec 2020 Jakub Romanowski SQL Terms Beginners Should Know – Part 2 This is the second part of my list of essential SQL terms for beginners. In the first, you learned what a table, relational database, and query are. Now, it's time for more advanced database terms. But don't be afraid! I won’t crush you with scientific definitions. I will explain everything simply so that you can easily understand. If you want to review the basic SQL terms, see my previous article, SQL Terms Beginners Should Know. Read more 3 Dec 2020 Kateryna Koidan How Do You Write a SELECT Statement in SQL? SQL is a language to communicate with relational databases, and the SELECT statement is the first thing you’ll learn when you start using SQL. In this article, you’ll learn how to write SELECT statements, from the basics to more advanced. What Is SQL? SQL stands for “Structured Query Language.” It has a long history that started in the 1970s. Being the standard for communication with relational databases, it has maintained its popularity. Read more 2 Dec 2020 Agnieszka Kozubek-Krycuń SQL Technologies Are More Common Than You Think Where is SQL being used today? The answers might surprise you! (Hint: SQL technology is basically everywhere.) Is it worth learning SQL? After all, the language was created in the 1970s. Is it still relevant today? The list of technologies that support SQL is very long – and it’s growing. Read on to find out what kinds of programs use SQL. SQL in Databases Relational Databases = SQL Databases It’s no surprise that SQL is used in relational databases. Read more 1 Dec 2020 LearnSQL.com Team SQL Course of the Month – Customer Behavior Analysis in SQL Do you run a business? Do you want to squeeze even more out of your data? Start by analyzing your customers' behavior using SQL! Throughout December, you can learn how to do it for free on LearnSQL.com! I asked Agnieszka Kozubek-Krycuń, Vertabelo's Chief Content Officer, about our December Course of the Month, Customer Behavior Analysis in SQL. Here's what she told me. Let's start with the basics: Why analyze customer behavior? Read more 27 Nov 2020 Ignacio L. Bisso What Is a Foreign Key in SQL? What does a foreign key do in SQL? Why would you need one? Learn the ABCs of foreign keys in five minutes. Foreign keys are a central concept in SQL databases; they allow us to enforce data consistency. Usually they work with primary keys to connect two database tables, like a virtual bridge. All SQL developers need to know what SQL foreign keys are, how they work, what data values are allowed in them, and how they’re created. Read more 26 Nov 2020 Kateryna Koidan Aggregate Functions vs Window Functions: A Comparison If you aren’t familiar with SQL’s window functions, you may wonder how they differ from aggregate functions. When should you use window functions? In this article, we’ll review window functions and aggregate functions, examine their similarities and differences, and see which one to choose depending on what you need to do. After you’ve tackled basic SQL, you’ll probably want to get into some of its more advanced functions. That’s great; these functions make reporting and analysis easier. Read more 25 Nov 2020 Tihomir Babic How to Find All Employees Under Each Manager in SQL Have you ever been tasked with building an organizational chart – i.e. finding the employees under each manager in a company? In SQL, you can do that easier than you think! This article will show you how to get the answer using a recursive query. In the business world, it’s a very common task to list all the subordinate employees for a given manager. Is doing this hard enough to warrant a whole article? Read more 24 Nov 2020 Jakub Romanowski SQL in the Open-Source World Did you know there are free, open-source databases that use SQL? In this article, I'll show you which open-source database solutions can meet your needs. Ever wonder why many people still use paid programs when the same things can be done with free options? Personally, I am an avid supporter of the open-source movement. For years, I have been trying to apply and promote such solutions and support an active community around them. Read more 20 Nov 2020 Adrian Więch How To Learn The SELECT Statement in SQL When you think about learning SQL, one of the first things you come across is the SELECT statement. Selecting information is arguably the most important SQL feature. In this article, we’ll demonstrate the typical use cases for SQL SELECT with practical examples. Read this article if you’re a beginner database user and would like to know what SELECT can do for you. SQL, or Structured Query Language, is the programming language the IT world uses to communicate with databases. Read more 19 Nov 2020 Martyna Sławińska What Is a SQL Constraint? What are SQL constraints? When and why should you use them? We give examples of common constraints and demonstrate how to apply them. When you’re creating a relational database, you often want to impose certain restrictions on some columns. For example, a column containing a social security number should store only unique values; a column containing a date of birth should not be null, or left empty. These conditions can be ensured by using SQL constraints. Read more 17 Nov 2020 Agnieszka Kozubek-Krycuń The History of SQL – How It All Began Who created SQL and why? Find out in this article! Are you learning SQL? Or are you about to take the first step towards working with databases? Great decision! Either way, it's worth knowing the history of SQL – where it came from, who came up with it, and why. Here’s a brief history of SQL, starting with its foundational concept: the database. Ted Codd and the Relational Data Model The first computer databases appeared in the late 1960s. Read more 13 Nov 2020 Kamila Ostrowska Practice SQL Before Interviewing a Potential Employee Has your company grown to the point that you need to hire an SQL expert? Have you found a candidate for the job? How do you prepare for the interview, especially if you don’t know SQL? Don't worry! Follow our suggestions on how to practice SQL. We have tips and tricks to help you feel confident and find the perfect employee. Who You Want To Hire First of all, you need to know the requirements for the new employee. Read more 12 Nov 2020 Marija Ilic SQL JOIN Types Explained What’s the difference between INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN in SQL? When should you use each one? We’ve got your answers right here. You want to combine data from two or more different tables, but you’re not sure how to do it in SQL. No worries. In this article, I will show you how to use the SQL JOIN clause to merge data from two tables. Read more 11 Nov 2020 Zahin Rahman Top 7 Online Courses for Data Engineers This article summarizes the top online courses available for data engineers. We have picks suitable for beginners as well as intermediate learners. If you’re interested in database design and management, check these courses out! Most individuals who aspire to enter the realm of data aim for data scientist or data analyst roles. While these roles are indeed very rewarding because of their tangible links to customers and business direction, the role of data engineers is equally vital for businesses that operate in a data-rich environment. Read more 10 Nov 2020 Jakub Romanowski SQL Terms Beginners Should Know Have you started learning SQL? Do you feel a little lost in the maze of new words and ideas? Here’s a list of 10 absolutely essential SQL terms for beginners. When you start learning SQL, there’s a lot to process. And some of it – even basic SQL terms – gets lost in the shuffle. If this sounds like you, bookmark this article; it will be a handy reference. Read more 6 Nov 2020 Magdalena Wojtas Where to Go After Learning SQL Basics Learning to code is – in general – a lot of fun, for sure. Even after a few years in the IT industry, I still love learning new technologies. And I now know that learning with a good plan is even better than learning without one. This also applies to learning with advanced SQL courses. In this article, I'll show you how learning paths can save you some time and a lot of frustration. Read more 6 Nov 2020 How to Remove a Primary Key in SQL Problem: You want to drop a primary key from a table in a database. Example: We want to remove the primary key from the table product. Solution 1: ALTER TABLE product DROP PRIMARY KEY; Discussion: To drop a primary key from a table, use an ALTER TABLE clause with the name of the table (in our example, product) followed by the clause DROP PRIMARY KEY. Since a table can have only one primary key, you don’t need to specify the primary key column(s). Read more 6 Nov 2020 How to Get a Remainder Using MOD() in PostgreSQL, MS SQL Server, and MySQL Problem: You want to find the (non-negative) remainder. Example: In the table numbers, you have two columns of integers: a and b. ab 93 53 23 03 -23 -53 -93 5-3 -5-3 50 00 You want to compute the remainders from dividing a by b. Read more 6 Nov 2020 How to Create a Primary Key in SQL Problem: You want to create a primary key for a table in a database. Example: We want a primary key for a table called product. Solution 1: Creating new table with a single-column primary key CREATE TABLE product ( id INT PRIMARY KEY, name VARCHAR(100) NOT NULL, producer VARCHAR(100) NOT NULL, price DECIMAL(7,2) ); Discussion: To create a new table with a column defined as the primary key, you can use the keyword PRIMARY KEY at the end of the definition of that column. Read more 6 Nov 2020 How to Compute an Absolute Value in SQL Problem: You want to find the absolute value of a number in SQL. Example: You want to compute the absolute value of each number in the column numbers from the table data. numbers -3.2 0 20 Solution: SELECT ABS(numbers) AS absolute_values FROM data; The result is: absolute_values 3. Read more 6 Nov 2020 How to Calculate a Square in SQL Problem: You want to find the square of a number in SQL. Example: You want to compute the square of each number in the column number from the table data. number 3 1 0.5 0 -2 Solution 1: Use SQUARE function SELECT number, SQUARE(number) AS square FROM data; Solution 2: Use multiplication operator * SELECT number, number * number AS square FROM data; Solution 3: Use POWER function SELECT number, POWER(number, 2) AS square FROM data; The result is: Read more 4 Nov 2020 Jakub Romanowski Kickstart SQL Learning with Our SQL Basics Course Updated on: February 19, 2024 Why learn SQL from our interactive online courses? Two reasons: 1) Power up your career. 2) Avoid being a noob. What does it mean to be a noob? “Noob” comes to us from the world of computer games. It’s a combination of “newbie” and “beginner”. It’s not a very nice word. It means that someone has found you an inexperienced player and (even worse) resistant to learning. Read more 3 Nov 2020 LearnSQL.com Team SQL Course of the Month – GROUP BY Extensions in SQL Do you want to develop your SQL skills? Do you want to get more out of your data and prepare better reports and summaries? The answer is learning to use SQL’s GROUP BY extensions. But how should you go about this? I asked the same question to Agnieszka Kozubek-Krycuń, Vertabelo’s Chief Content Officer. As she explains, the secret is in this November’s free SQL Course of the Month: GROUP BY Extensions in SQL. Read more 29 Oct 2020 Tihomir Babic What is the Difference Between COUNT(*), COUNT(1), COUNT(column), and COUNT(DISTINCT)? Have you noticed there are different variations of the SQL COUNT() function? This article explains the various arguments and their uses. As a SQL user, you’re probably quite familiar with the COUNT() function. Even though it’s relatively simple, it can be used in several different ways. Each way has a very different use. I imagine you’ve seen code that contains the function COUNT(*) or COUNT(1). You’ve probably also seen some other uses of the COUNT() function, such as COUNT(column name) and COUNT(DISTINCT column name), even if you haven’t used them. Read more 28 Oct 2020 Tihomir Babic What are SQL CTE Best Practices? Are you wondering what the best practices for using common table expressions are? This article will help you learn when to use a CTE and how to write it. If you have heard about SQL CTEs, you have probably noticed they’re often mentioned together with subqueries. Sometimes, people think there’s no difference compared to the subqueries, and there’s often debate about whether a CTE or subquery should be used to get a particular result. Read more 27 Oct 2020 Kateryna Koidan How to Fix a 'Not a GROUP BY Expression' Error Whether you are an experienced SQL user or only a beginner, your SQL queries may return errors. The accompanying messages are supposed to help you fix them; however, sometimes the messages are not very helpful. The Oracle message “Not a GROUP BY expression” is one such example. Let’s review what this is about and how to fix it. We are going to assume some basic understanding of how GROUP BY works. Read more 23 Oct 2020 Kateryna Koidan How to Learn SQL Common Table Expressions (CTEs) Common table expressions are very useful for organizing, traversing, and improving the readability of long SQL queries. Moreover, recursive CTEs, which can reference themselves, solve problems that cannot be addressed with other queries. But how do you master common table expressions in SQL? In this article, I discuss the most effective strategies for learning CTEs and suggest how to address the common challenges of learning common table expressions on your own. Read more 22 Oct 2020 Ignacio L. Bisso What is a Primary Key in SQL? Primary keys are an important concept in SQL databases. They provide a unique ID for every row in a database table. As an SQL developer, you should know what primary keys are, what data values are allowed in them, and how to create them. Read this article to learn the ABCs of primary keys in 10 minutes. How to Identify Rows in a Table Tables are the main objects in an SQL database, and as you probably know, tables store records or rows. Read more 21 Oct 2020 LearnSQL.com Team Is Learning SQL for Free Worthwhile? Everyone likes to get something for free, even when it comes to SQL courses. But is free always good? Find out how and where you can learn SQL for free – in a way that’s worth your time. Beginner-friendly database courses and SQL tutorials often promise to teach SQL fundamentals like SELECT, WHERE, GROUP BY, HAVING, and ORDER BY. These commands are the basis of a powerful set of skills for entry-level jobs in data analysis or databases. Read more 20 Oct 2020 Adrian Więch What Is a DBMS? Updated on: February 19, 2024 We generate vast quantities of data every day, and that data needs to be stored somehow. That’s where DBMSs come in handy. Find out what they are and how they relate to databases. If you go on a diet and simply want to keep track of your weight, you can probably use a piece of paper and a pencil. If you then want to chart your daily caloric intake, you’ll probably switch to something like a computer spreadsheet. Read more 16 Oct 2020 Adrian Więch Google Analytics and SQL Google Analytics is a very popular tool among website and blog owners alike. With a simple and quick setup, it lets you gather data about your web page visitors easily. However, did you know that you can export data from Google Analytics to create your own SQL reports? Read this article to find out how. Google Analytics is an extremely popular and powerful solution that lets you collect and analyze various kinds of information about your website. Read more 15 Oct 2020 Rebecca McKeown How to Boost Your Company With SQL Courses SQL has the power to supercharge the capabilities and performance of your entire company. But if you don’t dip your toes in the water and give some SQL courses a go, you’ll never realize the vast potential of the language. SQL, or Structured Query Language, is your ticket to expanding the scope and the results of your business or organization, no matter what sector you operate in. Whether you’re the owner or manager of your company or simply an employee interested in improving operations, learning SQL is undoubtedly, unquestionably, for you. Read more 13 Oct 2020 Martyna Sławińska What Is a Self Join in SQL? Explaned With 7 Examples The self join is a popular special case of the SQL JOIN. While most JOINs link two or more tables with each other to present their data together, a self join links a table to itself. This is usually done by joining a table to itself just once within a SQL query, but it is possible to do so multiple times within the same query. Typically, each table in a database stores a specific type of information. Read more 10 Oct 2020 How to Create a Table from an SQL Query Problem: You would like to create a new table in a database with data defined by an SQL query. Example: We would like to create the table gamer based on an SQL query. In this query, we select data from another table named championship presented below. idgamerscorechampionship_date 1alice142020-08-10 2supervisor102020-09-28 3happyman02020-08-10 4lukas62020-08-10 5oli122020-08-10 6biggamer72020-09-12 In the database, let’s create a new table named gamer which will store data in all of the columns defined in the table championship (id, gamer, score, and championship_date). Read more 10 Oct 2020 How to Create One Table From Another Table in SQL Problem: You would like to create a new table with data copied from another table. Example: Our database has a table named product with data in the following columns: id (primary key), name, category, and price. idnamecategoryprice 105roseflower5.70 108deskfurniture120.00 115tulipflower6.50 123sunflowerflower7.50 145guitarmusic300.00 155orchidflower9.50 158flutemusic156.00 In the database, let’s create a new table named florist which will store the following columns: id, name, and price. Read more 9 Oct 2020 Marija Ilic How to Join the Same Table Twice JOIN is one of the most common statements in SQL. As you may know, it is used to join and combine data from two or more tables into one common data set. In this article, I’m going to discuss special types of joins? in which you combine the same table twice—including joining a table to itself, also known as the self join. When and why do you need to do this? Read more 9 Oct 2020 How to Select the First Row in Each GROUP BY Group Problem: You've grouped your data with GROUP BY and would like to display only the first row from each group. Example: Our database has a table named exam_results with data in the following table: first_namelast_nameyearresult JohnKlein202040 EdithBlack202043 MarkJohnson201932 LauraSummer202035 KateSmith201941 JacobBlack201944 TomBennett202038 EmilyKelly202043 For each year, let's find the student with the best result. Read more 8 Oct 2020 Marcin Koryszewski 5 Best Online SQL Courses for Business Analysts Why bother to learn via an online SQL course? SQL is pure profit – it allows analysts to interpret data efficiently and companies to adopt better strategies. In this post, we’ll look at our top 5 SQL courses for business analysts. Being into finance, economics, and IT systems has brought you to business analysis. It’s a fascinating combination of skills; you’re combining business and technology, which makes you a valuable asset to your company. Read more 7 Oct 2020 Marija Ilic How to Create Your First Table in SQL Creating a database table with SQL is one of the core skills you’ll need to work with data. And it’s easy to learn, so let’s get started! Imagine you’re analyzing data and want to store your results in a database table. Sure, you've done this a million times in Excel. But you’re not sure how to create a table with SQL. Or maybe you’ve noticed that data engineering is in high demand and you want to start learning its core concepts. Read more 6 Oct 2020 Agnieszka Kozubek-Krycuń Five Essential Features of a Good SQL Course Updated on: October 04, 2024 There are many different platforms offering SQL courses. If you’re a beginner, it may be difficult to choose the right one for you. Find out what we think are the essential features of a good SQL course. Remember, if you make a poor choice at the beginning, you may get discouraged or get into bad habits that will impact your work down the line. Read more 2 Oct 2020 Martyna Sławińska A Comprehensive Introduction to Window Functions in MySQL Do a deep dive into the working principles, syntax, and applications of various MySQL window functions. There are many open source databases you could choose; MySQL is consistently one of the most popular. But until 2018, there was no provision for including window functions in MySQL. Fortunately, all that has changed – starting from MySQL 8.0, SQL window functions were now available to MySQL users. Please note that window functions are available only in MySQL 8. Read more 1 Oct 2020 LearnSQL.com Team SQL Course of the Month: INSERT, UPDATE, DELETE Data So, you've started learning SQL, and you already know what the SELECT command is and when to use it! Congratulations! Now, it's time to take the next step towards becoming an expert. You need to know the SQL UPDATE, INSERT, and DELETE commands to modify data in your tables. These are the basics that will allow you to work with tables. But what's the best way to learn them? I asked Agnieszka Kozubek-Krycuń, Chief Content Officer at Vertabelo. Read more 30 Sep 2020 Kamila Ostrowska How Will Learning SQL Make You a Better Boss? Updated on: April 6, 2024 Looking to enhance the performance of your team, elevate your own productivity, or boost the efficiency of your entire department or company? Consider learning SQL! Why? Because its benefits are substantial and the return on investment is significant. What does learning SQL and being a better boss have to do with each other? Being a better manager can make your employees happier while growing your business. Read more 29 Sep 2020 Tihomir Babic Six Window Function Templates to Save in Your Code Editor Do you use window functions often enough to know them well but not often enough to remember all the details? Here are six window function codes you should save as templates. Window functions are a handy SQL option, but it doesn’t mean you use them all the time. Maybe you only use them occasionally; if that’s the case, you probably find yourself needing to refresh your memory every time you use them. Read more 28 Sep 2020 LearnSQL.com Team New Course: Customer Behavior Analysis in SQL Good news! A new SQL course is here! We’re happy to announce the release of our Customer Behavior Analysis in SQL course. Do you want to get to know your clients and better understand their needs and behavior? If so, this great interactive SQL course is for you. Discover the power of full customer lifecycle analytics in SQL and know more than your competitors. The LearnSQL.com team is happy to announce the release of a new SQL course on our platform: Customer Behavior Analysis in SQL. Read more 25 Sep 2020 LearnSQL.com Team SQL Basics Cheat Sheet Download this 2-page SQL Basics Cheat Sheet in PDF or PNG format, print it out, and stick to your desk. The SQL Basics Cheat Sheet provides you with the syntax of all basics clauses, shows you how to write different conditions, and has examples. You can download this cheat sheet as follows: Download 2-page SQL Basics Cheat Sheet in PDF format (A4) Download 2-page SQL Basics Cheat Sheet in PDF format (Letter) Download 1-page SQL Basics Cheat Sheet in PDF format (A3) Download 1-page SQL Basics Cheat Sheet in PDF format (Ledger) Download SQL Basics Cheat Sheet in mobile-friendly PDF You may also read the contents here: Read more 24 Sep 2020 Ignacio L. Bisso What Is the MySQL OVER Clause? If you want to learn window functions in MySQL, you need to understand the OVER clause. In this article, we use real-world examples to explain what the MySQL OVER clause is, how it works, and why it’s so awesome. In 2018, MySQL introduced a new feature: window functions, which are accessed via the OVER clause. Window functions are a super powerful resource available in almost all SQL databases. They perform a specific calculation (e. Read more 23 Sep 2020 Jakub Romanowski SQL Means Business - The Way of an Engineer Have you been wondering why some companies fail and others achieve success? It's not a matter of luck but of the right people. Łukasz Kubicki at Vertabelo deals with business and product development. I asked him how he started his adventure with programming, how an engineer got into business, and if he liked playing computer games. Here's what he said. If you were to write one sentence about yourself, what would it be? Read more 22 Sep 2020 Jakub Romanowski Did You Know LearnSQL.com Has Free SQL Courses? Who doesn't like getting something for free? Each month, we give LearnSQL.com users a bit of help in their learning journey – a free, fully interactive SQL course. Since April, we have been giving our users the opportunity to learn SQL for free. Each month, we choose one of our SQL courses and give you full access to it for that month – completely free of charge! Cool, right? Read more 18 Sep 2020 Marcin Koryszewski How Much Do Data Engineers Earn in 2020? Data engineering is a hot job right now. What does a data engineer do? And just how much do they earn? We’ve done the research for you. If you are reading this, you’re either starting to learn SQL or you already know some and feel it’s time to look around for a SQL job. Maybe you’re in the midst of tackling our Creating Database Structure track. And, let’s be honest, maybe you need some extra motivation to keep on you track. Read more 17 Sep 2020 Tihomir Babic How to Use 2 CTEs in a Single SQL Query Have you ever wondered how to use multiple CTEs in one SQL query? Read this article and find out about recursive CTEs. After learning common table expressions or CTEs, a natural question is “Can I use several CTEs in one query?” Yes, you can! And you can do it quite easily, especially if you already have some basic knowledge of CTEs. Whether you know a bit about CTEs or you’re entirely new to the CTE world, reading about what a CTE is is always a good start. Read more 16 Sep 2020 Dorota Wdzięczna How to Join Two Tables in SQL Querying data from multiple tables is very common when working with relational databases. It is not difficult if you know how to use the dedicated SQL operators for doing this. In this article, you will learn how to join two tables by using WHERE and by using a special operator JOIN, and you will see how to filter rows in the result set. If you want to practice joining tables in SQL, check out our interactive SQL JOINs course. Read more 15 Sep 2020 Kateryna Koidan GROUP BY in SQL Explained The SQL GROUP BY statement is easy to use, but it can be hard to master. Learn what you can do with GROUP BY, how it works, and how to use it with aggregate functions. GROUP BY is one of the basic SQL tools. However, it might be difficult for beginners to understand how GROUP BY works and how it is used to compute statistics with different aggregate functions. In this article, I’ll use several examples to show exactly how GROUP BY organizes rows and how aggregate functions can be used to calculate statistics on one or more columns. Read more 11 Sep 2020 Arleta Więch Top 5 Beginner Online SQL Courses in 2020 Looking for an exciting new career? Data analysis won’t disappoint you! The simplest way to make this possible is by learning SQL, and online SQL courses are the most effective learning method. Don’t know where to start? Here’s an overview of the best online SQL courses for complete beginners. There are infinite reasons for changing your industry. You may want to land a new job because you’re burnt out. You may be bored and want something more challenging. Read more 10 Sep 2020 Agnieszka Kozubek-Krycuń Creating SQL Courses: Behind the Scenes at LearnSQL.com Take a peek behind the scenes and learn our secret for creating great SQL courses! Have you ever wondered how LearnSQL.com courses are created? Are we looking at a lot of hard work or just a bit of magic? Or maybe both? Here’s a hint: we rely on proven methods to create user-friendly online courses. But it’s not easy! Read on to see the 8 steps we take when creating a new SQL course. Read more 9 Sep 2020 Rebecca McKeown Why and How to Find Freelance SQL Jobs If Covid-19 has you all “I-want-to-stop-working-for-the-man-and-enjoy-a-more-fulfilling-life-as-the-master-of-my-own-destiny”, then I’ve got news for you. Not only is it possible to be an SQL freelancer, it’s also a potentially lucrative and liberating career move. It will allow you to work for a diverse range of clients and march to the beat of your own drum. Of course, SQL freelancing isn’t for everyone. You will need a strong sense of self-motivation, some serious hustling skills, and the ability to sell yourself and your services as THE ABSOLUTE BEST all the time, every time - day in, day out. Read more 8 Sep 2020 Dorota Wdzięczna Six Examples Using MySQL Window Functions Window functions are an advanced SQL feature available in most popular databases. MySQL had not supported them for a long time, but that changed in Version 8.0. They are helpful not only for analysts and people who create reports, but also for other professionals who use databases to select data needed. In this article, we explain the syntax of some popular window functions with practical examples. What Is a Window Function? Read more 4 Sep 2020 Marija Ilic What a Moving Average Is and How to Compute it in SQL Want to dive deep into time series data and examine long-term trends? Want to know what a moving average is and how to compute it in SQL? Then this article is for you. I’ll explain a powerful feature in SQL called window functions and show how you can calculate moving averages using them. The best way to learn about SQL window functions is the interactive Window Functions course at LearnSQL. Read more 3 Sep 2020 LearnSQL.com Team Fall 2020 Track of the Season: SQL from A to Z During Fall 2020, our main SQL track, SQL from A to Z, will be in the spotlight. In this article, we answer the most frequently asked questions about this track. At LearnSQL.com, our SQL courses are organized into tracks. A track is a sequence of courses designed to help you achieve a specific learning goal. The courses in the track are in a recommended order that progresses from the easiest to the most challenging. Read more 2 Sep 2020 Zahin Rahman How to Find Duplicate Values in SQL — The Ultimate Guide Updated on: November 28th, 2023 Find duplicate values in SQL efficiently and avoid wasting resources. This article demonstrates how to locate and address duplicate records using SQL's GROUP BY and HAVING clauses. Database best practices usually dictate having unique constraints (such as the primary key) on a table to prevent the duplication of rows when data is extracted and consolidated. However, you may find yourself working on a dataset with duplicate rows. Read more 1 Sep 2020 LearnSQL.com Team SQL Course of the Month – Analyzing Revenue Trends in SQL We work hard, we learn SQL, and we develop professionally. But why? For our own satisfaction, but also for money! The knowledge of SQL will increase your income significantly. If you are proficient in SQL, you can better analyze your company's revenue. How? I asked Agnieszka Kozubek-Krycuń, Chief Content Officer at Vertabelo. In this article, she answers your questions about our September SQL Course of the Month: Analyzing Revenue Trends in SQL. Read more 28 Aug 2020 Adrian Więch How CTEs Work The SQL language offers a feature named Common Table Expressions, or CTEs. Also known as WITH clauses, CTEs are a fairly new addition to SQL. They help you break longer queries into smaller chunks, making your queries much easier to understand. Read the article to find out how to use CTEs and how they differ from traditional subqueries. Common Table Expressions (CTEs), which are essentially named subqueries, were first mentioned in the SQL standard between 1999 and 2000. Read more 27 Aug 2020 Ignacio L. Bisso How Does SQL GROUP BY Work? Grouping results is a powerful SQL feature that allows you to compute key statistics for a group of records. GROUP BY is one of SQL’s most powerful clauses. It allows you to see data in a new way and find key metrics (like the average, maximal, and minimal values in a group of records). Without GROUP BY, all the results we obtain are oriented to records. With GROUP BY, we can create groups of records and calculate metrics on each group. Read more 26 Aug 2020 Kateryna Koidan SQL CTEs Explained with Examples Learn how you can leverage the power of Common Table Expressions (CTEs) to improve the organization and readability of your SQL queries. The commonly used abbreviation CTE stands for Common Table Expression. To learn about SQL Common Table Expressions through practice, I recommend the interactive Recursive Queries course at LearnSQL.com. It contains over 100 hands-on exercises on simple and complex recursive CTEs. What does a CTE do? Why might you want to use one in your SQL code? Read more 25 Aug 2020 Tihomir Babic How to Calculate the Length of a Series with SQL What is a time series and why bother to calculate its length using SQL? How do we calculate the length of a series in SQL? I can answer that in two words: window functions! Yes, you’ll need some knowledge of SQL window functions to calculate series length. But what is a time series, and why would you want to find out how long it is? What Is a Series? Read more 21 Aug 2020 Jakub Romanowski Where Can I Find Free Online Data Sets to Practice SQL? Updated on 4th Sep 2023. Diving into the world of SQL can be an exciting journey. But to truly master this language, you need to practice SQL regularly. In this article, we'll guide you through some free online data sets that will help you take your SQL practice to the next level. Let's get started! You've successfully installed your chosen RDBMS and grasped the basics of SQL. So, what's the next step? Read more 20 Aug 2020 Adrian Więch 5 Examples of GROUP BY When you start learning SQL, you quickly come across the GROUP BY clause. Data grouping—or data aggregation—is an important concept in the world of databases. In this article, we’ll demonstrate how you can use the GROUP BY clause in practice. We’ve gathered five GROUP BY examples, from easier to more complex ones so you can see data grouping in a real-life scenario. As a bonus, you’ll also learn a bit about aggregate functions and the HAVING clause. Read more 19 Aug 2020 Dorota Wdzięczna How to Create a Table in SQL Creating tables in databases is a very helpful skill, and not just for software engineers or database administrators. It allows you to design or change the structure of a database and store data that’s related to each other. In this article, you’ll learn what a database table is, who creates them, and how to use the syntax of the CREATE TABLE command. What Is a Database Table? A relational database is built of various structures like tables, views, procedures, and triggers. Read more 18 Aug 2020 Jakub Romanowski The Most Popular Databases in 2020 Which database solution is currently most popular? Which SQL dialect should you study? In this article, I’ll share the results of my research and my personal experience. Here are the databases that are worth learning SQL to use. First, let's answer some simple questions: Is SQL still useful? Is it worth learning? If you complete an online SQL course, will it make your work easier? The answer is YES! Why? Read more 13 Aug 2020 Adrian Więch How to Spend Less by Mastering the Monthly Budget in SQL Do you struggle to keep your budget under control? You must have heard about various budget planning materials available as printouts, Excel spreadsheets, or smartphone apps. In this article, we’ll show you another possibility. You’ll learn how to use databases and SQL to identify the weak points of your home budget and spend less. We all need to pay for everyday necessities such as groceries or medical appointments. With money coming in and out of our pockets, it’s easy to lose track of how much we spend and if we have any savings. Read more 12 Aug 2020 Rebecca McKeown Is There any Demand for SQL Language Nowadays? SQL is 46 years old. That’s 14 years older than I am, and at least 23 years older than the jar of pickles in my refrigerator. SQL is the still-hip granddaddy of the programming world. You know the one: non-ironic suspenders, twirled mustache, tattoo peeking out over his spotted socks. He may be old, but boy, is he fly. If you’ve heard of the NoSQL movement, you may be wondering: why learn SQL in this day and age? Read more 11 Aug 2020 Kamila Ostrowska 5 Reasons You Might Fail to Learn SQL Learning SQL isn’t hard, but that doesn’t mean you’ll sail through, problem-free. Here are five things that might cause unwary SQL learners to fail. For me, learning SQL wasn’t always about the joy of discovery. Learning itself is not all about curiosity and the satisfaction of succeeding. Sometimes there is a sense of failure. We’re often told it is better to focus on positives. I believe this. However, it is also crucial to find out what went wrong when we don’t succeed at something. Read more 7 Aug 2020 Jakub Romanowski Learning SQL When You Work and Have a Family Do you want to learn SQL but feel you can’t squeeze one more thing into your jam-packed life? Here are my tips on learning SQL when you work and have kids. You work full-time and have a family. Daily responsibilities overwhelm you. I’ve been there. Heck, I live there. I work from home and have a family. While I was writing this article, I was also waiting for a call on Zoom, doing the laundry, and cooking some pasta for my son’s dinner. Read more 6 Aug 2020 Kateryna Koidan Can you Join two Tables Without a Common Column? Yes, you can! The longer answer is yes, there are a few ways to combine two tables without a common column, including CROSS JOIN (Cartesian product) and UNION. The latter is technically not a join but can be handy for merging tables in SQL. In this article, I’ll guide you through the different solutions with examples. When Do you Need to Join Tables Without a Common Column? Beginners just getting started with SQL are usually introduced to standard equi joins, in which two tables are combined by a common column. Read more 5 Aug 2020 Tihomir Babic Who Should Learn SQL Window Functions? Do you want to learn how SQL window functions can help you at your job? This article will show you examples from various business applications where they can be very useful. I won’t be explaining what SQL window functions are in this article, but rather how to use them. If you’re not familiar with window functions or their syntax, don’t worry. Here’s an article that can help you with an introduction to SQL window functions. Read more 4 Aug 2020 LearnSQL.com Team SQL Course of the Month – Recursive Queries Recursive Queries is one of SQL’s more advanced features. You could say they divide SQL users into beginners and experts. But how do you learn recursive queries? And why do you need them, anyway? Agnieszka Kozubek-Krycuń, Chief Content Officer at Vertabelo, is here to help. In this article, she answers your questions about our August SQL Course of the Month: Recursive Queries. Recursive queries … that sounds very serious. Read more 31 Jul 2020 Dorota Wdzięczna The SQL HAVING Clause Explained What is the SQL HAVING clause? Why do you need it, and where do you use it? We’ll explain HAVING in detail. HAVING is a very common clause in SQL queries. Like WHERE, it helps filter data; however, HAVING works in a different way. If you are familiar with the GROUP BY clause and have only heard about HAVING – or if you’re not familiar with HAVING at all – this article is what you need. Read more 30 Jul 2020 Ignacio L. Bisso Using Subqueries in INSERT, UPDATE, DELETE Statements Did you know that subqueries can also be used in UPDATE, INSERT, and DELETE statements? Subqueries in SQL are like building blocks that can be used in a variety of statements, not just SELECT. If you find subqueries useful in SELECT, read this article to find out how useful they can be in other instructions. You will be able to create much more complex and powerful SQL queries in no time! Read more 29 Jul 2020 Jakub Romanowski Our 6 Favorite SQL Books So you want to learn SQL and query databases? Great! Check out these six SQL books for an in-depth look at the language and you’ll be writing queries in no time! You take SQL courses, participate in internet discussions and forums, watch tutorials on YouTube... What else can you do to develop your skills? Sometimes it’s good to reach for old-fashioned sources of knowledge: SQL books. Which book(s) should you choose? Read more 28 Jul 2020 Adrian Więch Who Is a Data Engineer? A new kind of job has recently emerged in the IT world: Data Engineer. At first sight, it may seem very similar to Data Analyst or Data Scientist positions. However, our article explains all the important differences. We present the skills, tools, and everyday tasks of Data Engineers. We also explain how you can get started with this career path. Thirty years ago, we typically used terms such as “Computer Scientist” when referring to anyone working with computers. Read more 24 Jul 2020 Kateryna Koidan What's the Difference Between Multiple Tables in FROM and Using JOIN? What’s your approach to joining tables in SQL? In this article, we discuss two approaches and explain why many SQL developers have a definite preference for JOIN. Do you prefer to list multiple tables in FROM and use WHERE to set the join conditions? Or do you use the JOIN keyword? SQL supports both, but there are significant differences between them. Let’s look at each one in detail and then discuss why JOIN is generally preferred. Read more 23 Jul 2020 Marija Ilic How to Analyze a Time Series in SQL Values ordered by time are called a time series. In this article, I’ll show you the most frequent patterns and teach you how to write queries for time series in SQL with the help of window functions. Maybe you’ve had the opportunity to analyze some variables where each value was associated with a time value. Such data – where values are ordered by time – is called time series data. Read more 22 Jul 2020 LearnSQL.com Team LearnSQL.com’s New Learning Path: Data Engineering Calling all future data engineers! Would you like to learn to use SQL? Then our new Data Engineering Learning Path is just for you! We’re very excited to announce the release of a new learning path at LearnSQL.com: Data Engineering, published in July 2020. This is the second learning path offered in our platform. So far, we offered an analytical path, SQL Querying & Reporting, that focuses on writing queries and business reports in SQL. Read more 21 Jul 2020 Zahin Rahman Using GROUP BY in SQL Now that you know SQL’s core commands, power up your queries with the GROUP BY clause and aggregate functions. GROUP BY is a SQL clause that arranges data into groups based on a common value (or values). It is widely used to obtain summary information for large datasets as well as for computing basic aggregate statistics. Once you have grasped SQL’s basic commands like SELECT, WHERE, and JOIN, mastering the GROUP BY clause can help you implement your SQL knowledge in real-world business intelligence scenarios. Read more 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 16 Jul 2020 Tihomir Babic When Should I Use a Common Table Expression (CTE)? Interested in hearing more about common table expressions or CTEs? Would you like to know when CTEs are useful? Read on—we’ll discuss in this article. If you’ve heard of common table expressions, you’ve probably wondered what they do. Even if you have not, it’s good that you’re here! CTEs can be very useful, especially if you have already mastered the basics of SQL, such as selecting, ordering, filtering data, and joining tables. Read more 15 Jul 2020 Jakub Romanowski How to Learn SQL Fast Updated on 11th Oct 2023. Are you in a rush to boost your data analysis capabilities? Dive into our comprehensive guide and learn SQL fast! You work with data every day, but you've had enough of how long it takes to process your giant table in Excel. The time has come for a much better tool: SQL! But how long does it take to learn SQL? In this article, I'll show you how to learn SQL fast and become the Vin Diesel of data – how to become the " Read more 14 Jul 2020 Ignacio L. Bisso How to Calculate the Difference Between Two Rows in SQL Calculating the difference between two rows in SQL can be a challenging task. It is possible – and there’s more than one way to do it. In this article, I’ll explain how to use the SQL window functions LEAD() and LAG() to find the difference between two rows in the same table. The best way to learn window functions is our interactive Window Functions course. It contains over 200 hands-on exercise that will teach you all window functions concepts, from simple OVER() clause to complex topics such as combining window functions and GROUP BY clause. Read more 10 Jul 2020 Adrian Więch What Is Data Engineering? Data Engineering is a fairly new term in IT. And it’s getting more and more attention. You may have heard about a few similar fields like data science, Big Data, and machine learning. This article explains the difference between these concepts and shows how they can be combined to analyze vast amounts of data. When computers first appeared, their storage capacity was very limited. Do you remember floppy disks? They were popular in the late 20th century and typically offered around 1. Read more 9 Jul 2020 Marija Ilic What Is a CTE? After mastering statements like SELECT, DELETE, INSERT, and GROUP BY, you might search for ways to improve code maintainability, reproducibility, and readability. At that point, you will probably start learning about modern SQL concepts that were introduced in the early 2000s. One such SQL technique is the CTE? (common table expression) —?a temporary named result set. In this article, you will learn what a CTE is and how to use it to improve the maintenance and the readability of your code. Read more 8 Jul 2020 Jakub Romanowski Top 10 Laptops for Learning SQL in 2020 If you want to learn SQL, you’re going to need a device that’s portable and powerful. I recommend a laptop. Here are the features you’ll need, as well as my picks for laptops to get you learning SQL in 2020! I must admit that browsing Amazon’s computer offers or entering any computer store can give you a headache. So many models, with so many options! They differ in components, workmanship, battery life, and screen size and resolution. Read more 7 Jul 2020 Agnieszka Kozubek-Krycuń What Is a SQL Dialect, and Which one Should You Learn? Updated on: September 12, 2023 SQL, standard SQL, SQL Server, MySQL, PostgreSQL, Oracle, … You’d like to learn SQL, but you feel overwhelmed with options and you don’t know where to start. We’ll explain what each of these terms mean and what this has to do with SQL dialects. Diving into the world of SQL dialects can feel like jumping into a deep pool without knowing how to swim. There's a ton of stuff to pick up! Read more 3 Jul 2020 Rebecca McKeown Why Learn SQL for iOS and Android Development? App and program development with iOS and Android is a huge and rapidly growing field in the software world. While some developers get through their careers knowing only their chosen development language, there are plenty of reasons to add SQL to that skill set. Here at LearnSQL.com, we are often asked: “why Learn SQL for iOS and Android development?” To answer that question, we’ve put together a little explanation about exactly why learning SQL makes sense for those in the app development space. Read more 2 Jul 2020 Jakub Romanowski SQL Course of the Month – PostGIS It's summer, and it's travel time ... at least it would be under normal conditions. The pandemic is still going on, but that doesn't stop us from dreaming about distant trips and visits to beautiful places. For now, most of us will have to do it on a map. Did you know that databases can store geographical data? With interactive maps, if you find a nice summer house on the internet, you can accurately track it and plan the best route there. Read more 1 Jul 2020 Marcin Koryszewski Listen to These 7 SQL Podcasts Are you learning SQL online but craving more? If you're looking for a way to squeeze some sweet SQL knowledge into your day, try listening to a SQL podcast. Choose one of our picks and get ready to amp up your SQL game! If you're like me, you like to get deep into a topic. You’re practicing it whenever there’s an opportunity. Of course, It’s hard to make time. I cherish the days I’m able to sit down and just get some hands-on learning done. Read more 30 Jun 2020 Kateryna Koidan How ORDER BY and NULL Work Together in SQL Do NULL values come first or last when you use ORDER BY? Are they considered higher or lower than non-NULL values? In this article, I’ll explain how different relational databases treat NULL values when sorting output and how to change the default behavior of the ORDER BY clause. When LearnSQL users practice the ORDER BY clause in our SQL Basics course, they often ask why NULL values appear first in the output and how they can change this behavior. Read more 25 Jun 2020 Jakub Romanowski How to Publish a LearnSQL.com Course Certificate on LinkedIn LinkedIn draws both job seekers and recruiters. Showcasing your knowledge, skills, and experience on this professional networking site can lead to great opportunities. We know this well at LearnSQL.com. Have you finished one of our courses? Great! Tell your future employer about what you have learned. Here's a step-by-step how-to guide for publishing a course certificate on LinkedIn. I will show you how easy it is to publish a LearnSQL. 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 23 Jun 2020 Kate Stolarek How to Learn the SQL Syntax Updated on: June 26, 2024 Understanding the basic SQL syntax is crucial for learning SQL. Read about what SQL is, and choose the best way for you among a wide variety of possibilities for learning SQL and remembering its syntax. Learning SQL can be a bit tricky, even if people say it's an easy language, especially when it comes to its syntax. Getting the hang of basic SQL syntax is key for learning SQL, and with so many ways to learn, it's vital to pick the one that fits your style best. Read more 18 Jun 2020 Jakub Romanowski A Mathematician in the World of SQL She has a PhD in Mathematics and over 10 years’ experience teaching mathematics and computer science at the University of Warsaw. She knows SQL better than just about anyone I’ve met. Let’s get to know Agnieszka Kozubek-Krycuń, Vertabelo’s Chief Content Officer at Vertabelo. Let's go back in time. How did your adventure with math start? I’ve always enjoyed abstract concepts and problem solving. I was fascinated by variables when we learned to solve simple equations like x+2=5 in primary school. Read more 17 Jun 2020 Adrian Więch Last-Minute Preparation Tips for a Database Class Exam Getting to learn SQL is fun. You don’t really need to spend much time to understand some basic SQL concepts and use them fluently. If you’re a student facing your first database class exam soon, we’ve got you covered. In this article, we explain what you should focus on while learning SQL and studying for an entry-level database exam. Check your knowledge with our 10 sample questions and discover where you can find more SQL practice. Read more 16 Jun 2020 Tihomir Babic How to Practice SQL Window Functions at Home Are you looking for a way to maintain your knowledge of SQL window functions? What’s the best way to practice them at home? Here are some suggestions. Learning something new feels great, but it’s also arguably the easiest part of gaining knowledge. You’ve probably experienced that yourself. You struggle with learning an idea, and then you finally get it! There’s the feeling you’ve learned something. And then, very soon, you practically have to start all over again with the very same concepts. Read more 12 Jun 2020 Jakub Romanowski Top SQL Social Media Groups & Channels to Follow We get news, advice, and funny videos from Facebook, Twitter, and YouTube. Why not use social media to help you learn SQL? You wake up and the first thing you do is check for Facebook notifications. Do you take a photo of your breakfast and share it with friends on Instagram? Maybe you argue with someone on Twitter about which James Bond was the best? Or maybe you are recording a short TikTok video of you singing Lady Gaga? Read more 11 Jun 2020 Kamil Bladoszewski What’s an SQL Inline Query? Have you ever heard the term “inline query”? How are they different from subqueries and derived tables? Have you looked this up in numerous places and still don’t know the answer? Let’s embark on a journey and find out together! The first time I heard the term “inline query”, I was a little bit surprised. It doesn’t sound like one of SQL’s nuances and I thought I knew all the basic concepts. 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 9 Jun 2020 Kateryna Koidan Practical Examples of When to Use Non-Equi JOINs in SQL If you think that two tables in SQL can be joined only using the common field, you will be excited to learn that there are other ways of joining. Non-equi JOINs use different kinds of comparison operators in the JOIN condition. In this article, I’ll guide you through non-equi JOIN examples to show the common use cases for this type of JOIN. Equi JOIN vs. Non-Equi JOIN How do you usually join two tables in SQL? Read more 4 Jun 2020 Pierre Timms How to Convince Your Boss You Need SQL Training Updated on: June 18, 2024 Learning SQL is a great goal. Now, if you could only convince your boss that it’s good for the company as well as for you ... You’re aware of the benefits of adding SQL to your skill set. You believe that the rewards gained from you learning SQL will also benefit your employer – it’s not just another way for you to develop your professional profile. Read more 3 Jun 2020 Rebecca McKeown Top 5 Programming Languages to Learn Alongside SQL If you already know or are about to learn SQL, you’re well on your way to being a sought-after database administrator, database engineer, or just a general database whizz kid! SQL is a modern, widely-used language that finds application in almost every industry. There is no shortage of jobs with SQL. But what if you want to branch out and learn another language to complement your SQL knowledge and skills? Read more 2 Jun 2020 Zahin Rahman How to Learn SQL JOINs JOINs are one of the most fundamental and commonly used SQL commands for manipulating and querying real-world data sets. They are also one of the more challenging SQL topics to master! In this article, you’ll learn an effective strategy to learn the different types of SQL JOINs. When data is stored in a single table, we can easily retrieve rows and get all the information we need. But when businesses scale, so does their data. Read more 29 May 2020 Kateryna Koidan What Are the Different Types of SQL Subqueries? Subqueries can be used in many business cases. What subquery types does SQL offer? And how can you use them efficiently? In this article, I’ll guide you through different subquery types and the typical situations when they are useful. What Is an SQL Subquery? A subquery, or nested query, is a query placed within another SQL query. There are many different scenarios where you may want to include a query in the WHERE, FROM, or SELECT clauses of your main query. 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 27 May 2020 Tihomir Babic 5 Advanced SQL Constructions Every Data Analyst Should Learn Does your job involve data analysis? Here are five examples of how advanced SQL can help you in your daily work. I’m a data analyst and I have to say – data analysts can be quite strange. Other people are usually afraid of immense amounts of data; we enjoy it. The deeper we get into data, the happier we are. An important tool for getting into data (and thus being a happier data analyst) is SQL. Read more 26 May 2020 Rebecca McKeown Is it Difficult to Learn SQL? It’s the number one question asked by the students of SQL and those new to the IT world. Is it difficult to learn SQL? If you came here because you’ve been pondering that very same question, take some comfort in the fact that in no way are you alone. Even the idea of SQL can be intimidating to those of us without a tech background, but it doesn’t have to be that way. Read more 22 May 2020 Kamil Bladoszewski Subquery vs. CTE: A SQL Primer Have you ever wondered about the differences between a subquery and a common table expression (CTE) in SQL? The concepts seem very similar, but knowing the difference – and when to use each one – will help you write efficient and readable queries. First, we’ll explain the concepts underlying subqueries and CTEs. Then we’ll look at a few examples and finally analyze the pros and cons of each technique. Read more 21 May 2020 Ignacio L. Bisso How to Number Rows in an SQL Result Set Have you ever needed to add a sequential number to the records in the result of an SQL query? It’s not as simple as it looks! Find out how to do it correctly in this article. To number rows in a result set, you have to use an SQL window function called ROW_NUMBER(). This function assigns a sequential integer number to each result row. However, it can also be used to number records in different ways, such as by subsets. Read more 20 May 2020 LearnSQL.com Team SQL Course of the Month – Creating Basic SQL Reports In May, we chose Creating Basic SQL Reports as our course of the month. Why? Because the basis of every successful business is making the right decisions based on proven data and good SQL reports. I asked Agnieszka Kozubek-Krycuń, Chief Content Officer at Vertabelo, about this. She knows SQL better than just about anyone and is probably the best person to talk about SQL Reporting. What does it mean to create SQL reports? Read more 19 May 2020 Jakub Romanowski Major Companies Using PostgreSQL: Purposes & Examples Updated on: May 17, 2024. Which companies use the open-source relational database management system PostgreSQL? Find out … and learn why you should be a PostgreSQL user too. You know the blue elephant logo. You have heard that PostgreSQL is a very good solution. But which companies use it? Here is a list of the largest IT and business companies that use PostgreSQL (or Postgres, for short). Multinationals worth billions of dollars can't be wrong, right? 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 14 May 2020 Ignacio L. Bisso Beginner’s Guide to the SQL Subquery Subqueries are a powerful SQL resource, allowing us to combine data from multiple tables in a single query. In this article, we’ll teach you everything you need to begin using subqueries. Perhaps the simplest definition of a SQL subquery is “A query inside a query”. Subqueries are so easy to understand that they often appear in the opening chapters of SQL courses. However, there are many variants of subqueries that need to be explained. Read more 13 May 2020 Tihomir Babic 11 Advanced SQL Interview Questions (and Answers) Do you want to move to a job that uses SQL? Are you unsure about what to expect during the job interview or how to benchmark your knowledge? This article will give you a good idea of where you stand. If you feel stuck in your job, you’re not the only one. The modern division of work pushes people to perform very specific tasks, expecting them not to look at what's on the other side. Read more 12 May 2020 Adrian Więch SQL in Google Sheets? Yes, We Can! Did you know that you can write SQL-like queries in Google spreadsheets? This feature is incredibly powerful, versatile, and can replace most of the functionalities offered by Excel’s pivot tables. Read our article to find out how you can easily use the QUERY function to efficiently work with your Google Sheets data. Relational databases share many features with spreadsheets. When we explain what databases are, we often say that they are a bit like spreadsheets except they give us more control over larger amounts of data. Read more 8 May 2020 Marija Ilic Why Should I Learn SQL Window Functions? SQL has been around for more than 25 years. Its basic syntax – like SELECT, WHERE, GROUP BY, HAVING, and ORDER BY – is well known. But is there something besides traditional SQL? Can you go beyond the basics and improve your skills? The answer to this question is yes. There is a modern version of SQL. In this article, we are going to dive into the modern version and learn about SQL window functions. Read more