Skip navigation
Courses
Pricing
For Students
SQL Library
Articles
Cookbook
Cheat Sheets
For Beginners
Best Way to Learn SQL
SQL Primer
Flashcards
About Our Courses
Guides
150+ SQL Practice Exercises
100+ SQL Interview Questions
SQL Interview Cheat Sheet
GROUP BY and Aggregate Functions Guide
SQL JOINs Guide
Window Functions Guide
Numeric Functions Guide
String Functions Guide
Common Table Expressions
Log in
Create free account
fullName
User profile menu open
Open user profile menu
fullName
Dashboard
My Profile
Payment & Billing
Log out
MENU
CLOSE
Courses
Pricing
For Students
Articles
Cookbook
Cheat Sheets
Best Way to Learn SQL
SQL Primer
Flashcards
About Our Courses
150+ SQL Practice Exercises
100+ SQL Interview Questions
SQL Interview Cheat Sheet
GROUP BY and Aggregate Functions Guide
SQL JOINs Guide
Window Functions Guide
Numeric Functions Guide
String Functions Guide
Common Table Expressions
Dashboard
My Profile
Payment & Billing
Log in
Create free account
Log out
Articles
Cookbook
4 Apr 2017
Aldo Zelen
5 Books That Will Grow Your SQL Skills
Looking to take your database skills up a notch? I've spent some time digging into various resources, and I want to share five advanced SQL books that really stood out. These texts are not just about learning the basics: they're about mastering the intricacies of SQL and truly enhancing your database management prowess. Whether you're troubleshooting complex queries or optimizing performance, these books provide insights that are both practical and transformative.
Read more
30 Mar 2017
Marek Pankowski
How to Organize SQL Queries When They Get Long
The first long SQL query you’ll have to deal with is likely to be hard for you to structure and understand. These five tips will teach you the best way to organize SQL queries, i.e. write and format them. As we all know, SQL queries are essential to database management. Without them, it would be extremely difficult to find and work with the information in a database. Query length depends on the type of information we need and the size of the database.
Read more
28 Mar 2017
Dejan Sarka
Statistics in SQL: Calculating Frequencies & Histograms
Database and Business Intelligence (BI) developers create huge numbers of reports on a daily basis, and data analyses are an integral part of them. If you wonder whether you can perform statistical analysis in SQL, the answer is ‘yes’. Read my article to learn how to do this! Statistics are very useful as an initial stage of a more in-depth analysis, i.e. for data overview and data quality assessment. However, SQL statistical analysis possibilities are somewhat limited as there are not many statistical functions in SQL Server.
Read more
22 Mar 2017
Marian Dziubiak
Improving Query Readability with Common Table Expressions
What is a Common Table Expression, or CTE? Where do you use them, and why? This post answers your questions. Simply put, Common Table Expressions (also known as WITH clauses) are essentially named subqueries. They also provide additional features like recursion. If you're new to subqueries, I recommend you read the SQL Subqueries article before continuing. The main purpose of Common Table Expressions is to improve the design and readability of an SQL statement.
Read more
15 Mar 2017
Maria Alcaraz
Understanding the Use of NULL in SQL Three-Valued Logic
NULLs are necessary in relational databases, and learning to use them is fundamental to SQL success. However, NULLs should also be handled with care, as we explain in this post. In relational databases, we don’t always have a value to put in a column. For example, suppose we have a table called “persons” that has “first_name”, “last_name”, “birth_date” and “marriage_date” columns. What value will we store in the “marriage_date” column for single persons?
Read more
21 Feb 2017
LearnSQL.com Team
The Complete Beginner’s Guide to SQL Fundamentals
If you're new to SQL, you've come to the right place. LearnSQL.com is a fantastic resource for learning SQL from the ground up. Before you start using SQL, it's helpful to understand what it is and how databases function. This guide provides a clear introduction to SQL fundamentals. At first, SQL may seem complex, but with the right approach, it becomes much easier to grasp. This guide will simplify the basics of SQL, making it accessible for beginners.
Read more
25 Jan 2017
Jeffrey J. Keller
Grouping, Rolling, and Cubing Data
The first two articles in this series highlighted SQL Server's ability to organize data into user-defined windows and its aggregate functions. Part 3 will focus on other methods of aggregating and organizing data using built-in SQL Server features – specifically, its grouping functions. For consistency, the same base data will be used as in the first two parts of this series. CREATE TABLE WindowTable (WindowID INT IDENTITY, House Varchar(32), FullName Varchar(64), PhysicalSkill Decimal(4, 2), MentalSkill Decimal (4, 2)) GO
Read more
24 Jan 2017
Maria Alcaraz
Performing Calculations on Date- and Time-Related Values
Relational databases support several date and time data types. In this article, we'll look at several arithmetic operations we can do on these types. These operations are logical and understandable, even for the beginning SQL coder. Let's first briefly explain the main data types used for dates and times. Keep in mind that data types may differ by database engine, so check your database documentation for specifics before you start working with them.
Read more
3 Jan 2017
Aldo Zelen
How to Recognize SQL Text Data Type
How can you store textual information in database tables? Thanks to this post, you’ll learn the characteristics of every text data type in SQL Note: This post is intended for readers familiar with SQL data definition language (DDL) and the DDL CREATE statement. To learn more about DDL, check out LearnSQL.com. Most data types are classified as NUMERIC, CHARACTER, or DATE. In this post, we’re going to focus on each CHARACTER or text data type in SQL.
Read more
28 Dec 2016
Aldo Zelen
Refine Results with SQL Set Operators
Using UNION, UNION ALL, EXCEPT, and INTERSECT to manage SQL query results. The function of SQL set operators is pretty simple; they allow us to combine results from different SQL queries into one result set. The best way to understand how set operators work is to use visual methods like the Venn diagram. For those of you not familiar with Venn diagrams, they are two circles that represent items or collections of items.
Read more
««
«
1
2
3
79
80
81
83
»
»»