SQL Essentials: A Beginner’s Handbook for Querying

Learn SQL with Udemy

For an instructor lead, in-depth look at learning SQL click below.


Welcome to your beginner’s guide on SQL (Structured Query Language)! SQL is a standard language for managing and manipulating databases. It is an extremely powerful tool, and learning SQL will allow you to delve deeply into the data and retrieve the information you need. In this blog post, we will show you the basics of SQL, along with examples of how to use it effectively, no matter what database you’re using.

Selecting data

Perhaps the most common operation performed with SQL is retrieving data from a database – this is done with the SELECT statement. Here’s how you can use it:

This command will select all data from the table “Employees”. The * symbol is a wildcard, standing for ‘all columns’.

Querying specific columns

If you want to retrieve only a selected few columns, you can specify these columns in your SELECT clause. Here’s an example:

This statement will select only the “FirstName” and “LastName” columns from the “Employees” table.

Filtering data with WHERE

You can use the WHERE clause to filter records. Only records that satisfy the condition in the WHERE clause will be returned. For example:

This statement will only select records of employees who earn more than $50,000.

Sorting data with ORDER BY

You can sort the results in ascending (ASC) or descending (DESC) order with the ORDER BY clause. The following example sorts the employees by their salary in descending order:

This article only scratches the surface of what SQL can do. In future posts, we will delve deeper into SQL, including UPDATE and DELETE commands, JOINs, GROUP BY and aggregate functions. Make sure to practise these basics to a point where you feel comfortable before we jump into more complex queries. Happy querying!

Leave a Comment