Reading Time: 6 minutesWhen I was first starting out with SQL Server, I had a hard time understanding the difference between COUNT(*) and COUNT(column), and how they are used with the GROUP BY clause. Many times, the COUNT(*) function would return the same results as the COUNT(<column>) function, so I just told myself Continue Reading
Querying data
SQL Server NULL: Are you making these 7 mistakes?
Reading Time: 11 minutesA proper understanding of NULL is absolutely essential for writing accurate queries that return accurate results. When you are first starting out with SQL Server, you might have these assumptions about NULL that are not quite right, or maybe flat out WRONG. If you misunderstand how SQL treats NULL, you Continue Reading
HAVING Clause: How it works
Reading Time: 6 minutesThe HAVING clause is a very useful tool we can use when querying SQL Server databases. When I was first learning SQL, I had a tough time understanding the HAVING clause. Looking back, I’m not sure what was so difficult to understand. It’s actually very simple. Are you struggling to Continue Reading
GROUP BY clause: A How-To Guide
Reading Time: 9 minutesWhen you are first learning how to query SQL Server databases, you might find yourself thoroughly confused by the GROUP BY clause. I know I was, for sure. You might ask yourself questions like: “What columns am I allowed to use in the SELECT list?” “Can I put more than Continue Reading
Set Operator Precedence: Explained
Reading Time: 7 minutesIn this tutorial, we will discuss a very useful topic you should know when querying SQL Server databases: Set Operator precedence. The three set operators available to us in SQL Server are UNION, INTERSECT, and EXCEPT. I have in-depth tutorials on all 3 different set operators, found there: The UNION Continue Reading