1. Introduction to Beginners SQL in one day!

Welcome to this Beginner guide to SQL in one day!

This introduction will explain what SQL is and why it is a MUST have skill to have as a Test Analyst! It will also show you how this tutorial works and gives you an overview of what you will be learning.

Table of contents
  1. Can I really learn SQL in a day?
  2. So, what is SQL?
  3. As a Test Analyst, why learn SQL?
  4. Who is this tutorial for?
  5. A structure to help you learn
  6. Practice, practice, practice!
  7. This tutorial…is just the beginning of your SQL and Database education!
1. Can I really learn SQL in a day?

Yes! Definitely yes!

I have laid out this tutorial for you to go from zero to being able to query databases at a very good level! 

No, you are not going to be an expert, but that’s not what I’m after you doing. I am after you knowing enough about SQL to walk into an interview and say “oh yes, I can comfortably query databases thank you”!

back to table of contents

2. So, what is SQL?
  • SQL is short for “Structured Query Language”. In the IT world, it is pronounced as “sequel” or “ess-que-ell”
  • It is a powerful but very simple query language used to create and maintain databases (storage for data)
  • It is a standard language used across almost all of the most popular DBMS’s (Database Management System), including ORACLE, Microsoft SQL Server, DB2, PostgreSQL, MySql to name but a few. Therefore, there is no having to learn different languages for each DBMS!

back to table of contents

3. As a Test Analyst, why learn SQL?

Increase your earning potential

  • As a Software Test Analyst…I believe that it is a MUST to have SQL as part of your skillset! The benefits? 
    • a must have skill for any Test Analyst to do their job properly, allowing them to interact with the data they’re testing
    • ability to earn £thousands more than people without technical skills
    • enhances chances immeasurably of getting that new and better job

Good enough reasons? Me thinks so 🙂 ! 

SQL is the number one used database language! If you do a search on the UK’s top job trending website https://www.itjobswatch.co.uk/ you will see SQL right up there, near the top…as it has been for years!

Be able to perform your job easier and more effectively

All major companies have databases propping up their systems! They will have online or batch systems collating data, storing it on databases, retrieving it, manipulating (updating / deleting) it and presenting it in the form of online and batch reports.

To test these systems effectively, you WILL NEED to interrogate the data in some way so as to perform validation tests (comparing presented data to what is stored)…and that is by executing SQL.

Do you need to be an expert?

NO, definitely not! You just need enough knowledge to be able to interrogate a database and maybe be able to update it to help you set up data. 

Me personally, I can actually design and create databases and also write Database Programming Scripts (using a DB programming language). Have I used this experience whilst testing? Yes, but only because I had the knowledge and maybe that’s what you can build up to…starting with this tutorial!

Is it hard to learn?

No! It is probably the easiest IT language to learn. If you want to be an expert, then yes, it will take quite a while, but there are various levels that you can learn and as a Test Analyst, you can just learn how to retrieve data from a database.

It is very powerful, yet simple. Unlike most other computer languages, you can get away with knowing very few “SQL words”

back to table of contents

4. Who is this tutorial for?

This tutorial has been written for people who:

  • have no SQL experience
  • just wish to learn the basics required by a Test Analyst
  • would like to learn in a simple progressive manner

It will give you just the right amount of knowledge that a Test Analyst needs to retrieve data from (interrogate) a database.

This is one in a series of tutorials that I will be writing for this website, so as to enable you to become a Professional Test Analyst! I have written things to allow you to learn in the most efficient and quickest way possible, showing you the best ways to test.

back to table of contents

5. A structure to help you learn

5.1 Tutorial broken down into 6 main lessons

To help you to learn the basics of SQL more easily I have broken this tutorial down into 6 main topics / lessons (which includes this introduction), as can be seen in the following diagram. The topics progress in a way where they build upon the previous topic step-by-step, slowly increasing your knowledge.

At the end of each lesson (except this Introduction and lesson 2. How to run your SQL) is a Test Yourself test. Please ensure you give these a go, as they will confirm that you have digested things so as to enable you to move onto the next section! When you do take the tests, if you score less than what I’ve indicated for each test, then I would definitely suggest just slowly going over the section again, then…take the test again 🙂 !

  1. Introduction

The section you are reading now.

  1. Where to run your SQL

This lesson introduces you to a FREE online application where you can run your practice SQL.

  1. Database Basics

This lesson will give you just the right amount of information needed about databases for you to learn SQL. 

  1. Basic Data Retrieval

After understanding enough about databases it is time to introduce you to SQL! This lesson gently teaches you about the way to retrieve data from a database, by running small scripts to build your confidence, using an SQL SELECT statement.

  1. More Data Retrieval

The previous lesson slowly introduces you to the SELECT statement. This lesson will expand on the statement, giving you a broader knowledge of the powerful things you can do with SELECT.

  1. Joining tables

This is where things get really interesting!

Up to now you will have learned how to retrieve data from just one table in a relational database, now, you will learn a very important skill of how to retrieve data from multiple tables.  

5.2 Conventions of this Tutorial

5.2.1 Code conventions

The following is an example of SQL code that will be presented in this tutorial:

-- This is a comment
SELECT transaction_date
FROM account_transaction
WHERE transaction_id = 1;

Conventions:

  • Keywords of the SQL language will be coded in CAPITALS
  • Specified programming names, names of Database Tables, Columns etc, will be coded in lowercase
  • String and numeric values will also be coded in lowercase
  • Comments will be preceded by 2 hyphens

Don’t worry if you don’t know the terms such as Keywords, String and Numeric values etc, as these will be explained as we go along.

5.2.2 Creating your Example Table(s) and Data and running your SQL

Before the example code that I present in this Tutorial, you will be creating a temporary Table(s) and its Data. This will serve so as to allow you to run example code yourself. When I need you to create these, then you will see:

When I want you to run an example SQL statement(s), then you will see:

Below the SQL statement(s), you will see the expected results as:

To explain how the SQL Statement(s) works, you will see:


5.2.3 Other Tutorial help

When I want you to be aware of something, you will see:

To help you with my many years of personal IT experience, I will, now and again, give you an insight into what the real world of IT is like. That’s where you will see: 

back to table of contents

6. Practice, practice, practice!

There really is nothing like “doing it” when it comes to learning something new! The “doing it”,  in this case, is by actually writing your own SQL scripts and running (executing) them! Once you have completed a lesson, then try to put your new found skills to the test by executing as many scripts as you can, using the FREE application (http://sqlfiddle.com/) explained in lesson 2! 

back to table of contents

7. This tutorial…is just the beginning of your SQL and Database education!

By following this tutorial, you will have a good understanding of basic SQL, enough for you to do your job as a Test Analyst. It is not meant to allow you to become an SQL expert, but is just a gentle introduction to give you the confidence to learn more.

As a Software Test Analyst, is it worth me learning more than retrieval of data?

Yes. In this tutorial, you will learn how to retrieve data from a database, which is a great start and, maybe, for some Test Analysts all you will need, but there really is so much more to SQL. It is how we create and interact with a database. It is how we also maintain the database, the tables that hold the data, how we insert, update and delete data. 

As a Test Analyst in today’s world, I made it my mission to learn as much technical info as I could. By learning how to maintain data you will be in a great position so as to find relevant data, set up your own data and even perhaps create your own database!

And why not learn more technical skills

To really make an impact in your Software Test career, you should attempt to develop other technical skills and interview techniques. This is where my future tutorials and interview guides will help:

  1. SQL Basics for Software Testing Tutorial
  2. Interview Techniques and Questions
  3. API Testing for Beginners Tutorial
  4. Basic Java Programming for Testers Tutorial
  5. Basic Selenium Programming for Automation Testing Tutorial
  6. Advanced Selenium Programming Tutorial

To ensure that you don’t miss any future tutorials that I publish, please Subscribe 🙂 !

back to table of contents


Next Lesson ⇒ 2. How to run your SQL