From the Blog

SQL Survival Skills for Business Analysts

Ok, if you're like me, at some point you may find yourself frustrated with waiting for someone else to run your query, write your report or build your dashboard. You've gathered and submitted all of your business requirements and now you're patiently waiting in line for someone to do this work for you while your boss paces, not so patiently, outside your office waiting for the information they requested. Wouldn't it be nice, especially if it's just a quick question, if you could just write and run the query yourself to get your boss the answer she needs?

Or maybe you're just curious as you watch your DBA type out that colored SQL text that retrieves data from your database, quickly getting you the answers you need, and think ' Now that is cool!' Well, as a pretty independent guy (ok, some say control freak), I wanted to learn this magic SQL language from the moment I first saw it. I realized, a little at first, and much more later on, that this was the key to getting information out of a database.

Now yes, there are some 'user friendly', wizard driven, report and BI programs like Excel, Crystal Reports, MicroStrategy and Tableau to name a few that advertise the ability to empower business users and analysts to write their own reports and build their own dashboards. But, as I've learned over the years, underneath their user friendly interfaces, what these programs are really doing is writing and executing SQL queries, and usually against data sets that have already been retrieved and prepared for them by IS and BI personnel. So, if you want the ability to see and understand what your report or BI program is really doing as it gathers your data and builds your report, and why you're getting the results you are, then what you really want is at least a basic and fundamental understanding of SQL queries. Besides, I learned the hard way, that these wizards often do not write the most efficient or effective queries for getting you the information you need.

So, my StreetSmart SoB's (Students of Business), are you ready to learn some basic SQL? Would you like to fast forward past all the academic, esoteric and theoretical studies of relational databases of which our DBA friends are so fond and just get right to the point of learning how to get information out of your SQL databases? Then this is exactly what this SQL Survival Skills series will teach you. This 'course' is designed for those who just want to query a database to retrieve information – folks who aren't necessarily interested in building, maintaining, updating or optimizing their own databases, but who just need to get information out of an existing enterprise database. This is for analysts and application managers and perhaps some advanced business users – but will stop far short of being useful to experienced DBA's (unless maybe you're trying to teach SQL queries to us amateur analysts).

If you have already dabbled a little in the SQL Management Studio and have access to one of your own test databases, then you can apply what you learn here to queries against your own database. If not, don't worry, we'll show you how to download the free version of SQL Management Studio and how to install a sample database, both of which are available from Microsoft. Note: If you are just starting out and are working with your DBA to get set up to query your own database, I strongly suggest requesting 'Read Only' access to the database – that way you're both certain you will not accidentally update or delete something from the database.

In this SQL Survival Skills series, you can expect to see articles on some of the following topics:

  • Introduction to SQL Databases, Tables and Fields
  • Introduction to the SQL Management Studio and Query Analyzer
  • SQL Shorthand – Learning to use alias' for table names
  • JOIN the inner SQL Circle
  • Introduction to SQL Data Types
  • Cool SQL Query Commands – CAST, CONVERT, DATEDIFF

Ok, that's enough for now, but we'll take this as far as you want to go. And don't worry, even if you're never programmed before, I'm pretty sure I can teach you at least the fundamentals of writing SQL queries. From there, we'll take it as far as you're interest and enthusiasm for the topic will go.


Until next time, rock on!