Tag Archives: Technology

SQL Order By Cheat Sheet

This is a cheat sheet that I have put together for keeping track of the results of ordering different types of columns in ASC and DESC order and the rules around each.  This order is fairly standard for most ANSI database servers.  However I do not believe that there is anything in the ANSI spec that dictates this as a requirement.

Continue reading SQL Order By Cheat Sheet

Python virtualenv and crontab

I created a small simple bot in python to download the updated GeoNames daily updated files to be processed by the database.  These files are generated each day and remove the need to load a full 2GB dataset into the database to keep the database updated.

Continue reading Python virtualenv and crontab

Rounding

Rounding is the representation of a number in a shorter, simpler or more explicit way. Its intended purpose is to replace any number with a shorter representation of it. It is important to remember that you are manipulating that number and what that manipulated representation is meant to convey. The root of the issue is simple. When you round a number, you are changing the number.

Continue reading Rounding

Using JOIN for Suppression

We usually use JOIN to find the intersection between two different tables.  For example, if you want all the orders from the order table who belong to a certain set of customers from the customer table.

This is the most common usage of a JOIN, specifically an INNER JOIN.  The results only include the entries that matchup from each table.  There are many other situations that you can incorporate a JOIN to solve.  Particularly here we are going to talk about using a JOIN to suppress information from one table by using another. Continue reading Using JOIN for Suppression