Geographic Analysis in SQL: Measuring Polygon Area from Latitude and Longitude

Computing the area of polygons on the Earth's surface can be difficult, especially when the polygons are complex and have a large number of vertices. Here is a pure SQL solution to help you get started with your geographic analysis.

Read More
SQL History and Why Your Database Isn't Really Relational

Rather than a true relational database, SQL is a compromise between convenience and the rigour of relational algebra. Here's how it's different.

Read More
SQL Query Order of Execution

The SQL order of execution defines the order in which the clauses of a query are evaluated. Let's look at how your query SQL executes, and how you can use that knowledge to write faster SQL

Read More
How ZeroCater Made Our Lunch Data-Driven: Survey Analysis and the IoT

Here at Periscope we absolutely love data, so I couldn’t help but notice when our catering company, ZeroCater, brought in an amazing device to collect survey data about our lunches in real time. ZeroCater has always delivered us a great meal, but for a data driven analyst like myself this this was too interesting to ignore...

Read More
Precision Recall and ROC Curves for Pregnancy Tests

As a data nerd who hates taking chances, I thought I’d perform an example analysis on pregnancy tests to figure out whether or not the current standard of measuring the hormone hCG (human chorionic gonadotropin) is the most optimal method. After all, no matter if you are a woman who wants to be pregnant or a woman who doesn’t, having an incorrect prediction is not something you want to risk. With Periscope Data, use SQL to map out Precision-Recall and Receiver Operating Characteristic (ROC) curves.

Read More
What You Need To Know About SQL's GROUP BY

The SQL 'group by' is one of the most common keywords. Here is how it works, and a few special cases you want to be aware of

Read More
SQL Symbol Cheat Sheet

When you are new to programming in SQL, you will come across a lot of hard-to-search-for character operators. If you are prone to forgetting ~ is called tilde, are wondering why there are so many %s in your strings, or have a hard time googling what the (+) symbol in where users.group_id(+) = group.id, this guide is for you.

Read More