How to use the GROUP BY clause on multiple columns in SQL?
How to use the GROUP BY clause on multiple columns in SQL?
72 tutorials tagged SQL on Machine Learning Plus, newest first. Most of them belong to the SQL category.
How to use the GROUP BY clause on multiple columns in SQL?
How to sort multiple columns in SQL and in different directions?
How to count the number of work days between two dates?
How to compute maximum of multiple columns, aks row wise max?
Let's understand the difference between CROSS JOIN and INNER JOIN with example
Let's see how to get a list of dates between two dates in SQL using an example. We will explore alternate solutions as well.
How to get records from one table that does not exist in another?
How to exclude a column using select * except column in SQL? Let's also see some work arounds.
Let's see how to access the 'previous row' value in a SELECT statement in SQL?
Let's understand the difference between UNION and UNION ALL with an example
How to use GROUP BY to concatenate strings in MySQL and SQL Server?
Let's see how to find duplicate values in an SQL table.
You have a table with a column where some rows contain NULL values or empty strings. You want to retrieve rows where this column has a value (i.e...
Let's see how to get top n results in each 'group by' group in SQL. You have a table with multiple records. For each distinct value in each 'group...
Let's see how to concatenate multiple rows into one field in MySQL?
Understand the difference between INNER JOIN, OUTER JOIN and FULL OUTER JOIN with examples and compare the results.
Let's see how to select a random row from large tables efficiently using SQL
Let's see how to randomly select rows from a large table quick and efficiently in SQL
Let's look at how to escape a single quote in SQL Server, with a solution that is also reproducible in MySQL
Learn how to efficiently convert rows to columns in SQL using PIVOT and CASE statements. Includes example problem, input table, and working solutions.
Let's see how to split values to multiple rows in SQL with an example problem and working solution.
Given a table in MySQL, how do you remove duplicate rows? Let's see how to solve this with an example and solutions.
Learn how to insert into a table or update if exists in MySQL and SQL Server. You need to calculate a running total in SQL Server and provide a...
Learn how to get the rows which have the max value for a column for each group in another column
Let's understand how to do a FULL OUTER JOIN in MySQL
Let's see how to calculate running total in SQL Server
How to switch rows and columns in SQL? Let's transpose so the rows become columns and columns as rows.
How to get the top 1 row of each group in SQL: the problem, the input table, the desired output and three solutions, each with an explanation of how...
Let's see how to transpose columns to rows in SQL. That is, how to reshape the table so that certain columns of a table are moved to rows.
How to select only rows with max value on a column for each distinct value in another categorical column in MySQL?
How to select first row in each 'Group By' group? Let's understand with example problem and solutions.
SQL window functions is considered a _'hard'_ concept in SQL. This set of exercises is designed to challenge your SQL muscle and help internalize...
SQL window functions is one of the advanced concepts, understanding which will give you the ability to do complex data wrangling and transformations...
SQL, short for Structured Query Language is a programming language used to communicate with databases and do various types of Data wrangling...
SQL Operators - Understanding SQL Operators with Examples and Syntax
SQL SELECT INTO a single command, you can accomplish two tasks of create a new table and fill it with data from an existing table.
Primary Key a cornerstone for maintaining data integrity and building complex database relationships.
Understanding SQL NULL functions, explaining their syntax and illustrating their use with practical examples.
Deep dive into a detailed discussion about the SQL Insert Into Select statement.
Use of foreign keys in SQL enhances the relationship between tables and ensures data integrity.
SQL DROP TABLE - An Expert's Guide to SQL DROP TABLE Command
SQL CREATE TABLE the intricacies of this important command, learn about its syntax, and run through an example of how to use it.
Exploring SQL comments a seemingly minor, but crucial aspect of SQL programming.
Deep dive into the SQL CASE expression. You will explore its syntax, uses, and provide examples to illustrate its applications.
Dive deep into one of SQL's most useful yet under-utilized functionalities: the EXISTS clause. This powerful tool can make your queries not only more...
The SQL ANY and ALL operators are used with a WHERE or HAVING clause. They enable us to compare a value to any or all values in a subquery or a list...
Understanding two extremely useful SQL operators - UNION and UNION ALL. We will understand their syntax, when and why to use them, and of course...
Dive deep into one of the most important aspects of SQL, 'The Self Join'. If you're looking to take your SQL skills up a notch, understanding and...
Deep Dive into a commonly misunderstood but fundamentally powerful aspect of SQL - the `HAVING` clause. The `HAVING` clause, often seen coupled with...
Unlock the power of data manipulation and summarization with the SQL 'GROUP BY' clause - your key to efficient and insightful data analysis.
SQL Right Join - A Comprehensive Guide on SQL right Join
SQL Left Join - A Comprehensive Guide on SQL Left Join
Deep dive into the world of SQL (Structured Query Language), specifically focusing on a pivotal concept – SQL Joins.
An Inner Join in SQL is a method to combine rows from two or more tables based on a related column
A comprehensive guide to SQL FULL JOIN: the syntax, how it returns every row from both tables with NULLs where there is no match, and worked examples...
This post focuses on an extremely handy operator, SQL BETWEEN, which is often overlooked yet can immensely optimize your querying process.
Dive into SQL aliases, what they are, why you need them, and how to use them effectively.
Get a handle on one of its powerful operators, the SQL IN operator and covering everything you need to know about it
Deep dive into an essential yet often overlooked operator in the SQL toolkit - the 'LIKE' operator
Dive deep into one of the most commonly used SQL commands - UPDATE. It is used to modify existing records in a table and is a crucial part of...
SELECT TOP is an essential clause for developers and database administrators, allowing for the efficient and strategic handling of voluminous data
Master SQL ORDER BY to sort query results by one or multiple columns. Learn ascending, descending order, NULL handling, and sorting with expressions.
Exploring an important, yet often misunderstood concept in SQL: `NULL` values. We'll also include hands-on examples with a sample dataset.
Explore two incredibly valuable aggregate functions: MIN() and MAX().
The SQL INSERT INTO statement is the command you need for this task, allowing you to add new rows of data into a table
Master the SQL DELETE statement with practical examples. Learn to delete single rows, multiple rows, use WHERE conditions, and understand DELETE vs...
Deep dive into the wonderful world of SQL (Structured Query Language), focusing on three pivotal functions: COUNT(), AVG(), and SUM().
SQL AND, OR, and NOT - A Deep Dive into the AND, OR, and NOT Operators
Exploring SQL WHERE syntax, usage, and some real-life examples to give you a robust understanding of this essential command
SQL `SELECT`statement is a crucial starting point. Deep dive into this fundamental command that brings data out of the shadows and into your view.
Deep dive into one of SQL's fundamental operations - the 'Select Distinct' statement.
A beginner-friendly introduction to SQL. Learn what SQL is, how relational databases work, and the fundamental commands for querying and managing...