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
13 Apr 2017
Marek Pankowski
5 SQL Functions for Manipulating Strings
SQL functions used for manipulating strings, commonly called string functions, are among most important SQL’s tools. In this post, we’ll look at five ways you can perform various operations on strings. There are many SQL functions that let you “edit” string data. As you learn SQL, you’ll see how useful they prove. Some sql trim off unneeded spaces or characters; others tell you how long a string is. These functions give you a lot of opportunities to transform and work with strings, which makes your code more effective.
Read more
10 Apr 2017
Francisco Claria
Preventing Common SQL Mistakes
Regardless of the engine you are using (SQL Server, MySQL, Oracle, etc.), you can prevent common errors and simplify the debugging process. This article will discuss some of the common SQL mistakes you’ll face and will help you correct them easily. One of the best ways to prevent the most common SQL mistakes is to keep your queries clear and readable. It’s very easy to forget the ideas behind your code!
Read more
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
««
«
1
2
3
78
79
80
82
»
»»