Blog Posts

Common SQL Window Functions: Positional Functions

Window Functions, analytics, SQL for advanced, aggregate functions, SQL clauses, positional functions

Positional SQL window functions deal with data’s location in the set. In this post, we explain LEAD, LAG, and other positional functions. SQL window functions allow us to aggregate data while still using individual row values. We’ve already dealt with ranking functions and the use of partitions. In this post, we’ll examine positional window functions, which are extremely helpful in reporting and summarizing data. Specifically, we’ll look at LAG, LEAD, FIRST_VALUE and LAST_VALUE. It is worthwhile mentioning that LEAD mirrors

Continue Reading

Four Reasons Aspiring Data Scientists Must Learn SQL

Isn’t data science way too advanced for simple SQL? Nope! SQL can help you build a foundation for your data science career. Let’s see how. Data science is hot right now. What if you could predict the next market crash? Or contain the spread of Ebola? Or accurately predict a health crisis months or even years before it happens? Data scientists are working hard on these kinds of projects, and they are earning healthy salaries in the process. No wonder

Continue Reading

Kill Online Distractions: 5 Tools to Help You Stay Focused

Phones, emails, social media accounts, and about a hundred other things are constantly competing for our attention. Can tech tools help us stay focused? A lot of apps say that they help humans work better and faster. But the truth is that the more interactive tools we use, the more focus-shattering notifications we get. In many ways, technology has gotten us into this problem. Can it help us get out of it? In a previous article, I explained why I

Continue Reading

SQL Mythbuster – 5 Reasons Why No One Should Be Afraid of SQL

Anyone can learn SQL.  It’s not as hard as you think! In today’s world, even those in non-technical jobs need some technical skills.  And you don’t have to be a hard-core nerd to get these skills.  Let me tell you my own story. A few years ago, I wasn’t considering learning SQL or anything else that I labelled “technical”.  My background is in sociology, journalism, and scriptwriting, and I thought computer languages were pretty sci-fi.  But once I started working

Continue Reading

Referential Constraints and Foreign Keys in MySQL

Foreign keys and referential constraints allow you to set relationships between tables and modify some of the database engine’s actions. This beginner’s guide explains referential integrity and foreign key use in MySQL. One of the most important aspects of database usage is being able to trust the information you store. Database engines provide several features that help you maintain the quality of your data, like defining required columns as NOT NULL and setting an exact data type for each column.

Continue Reading

GET ACCESS TO EXPERT SQL CONTENT!