Normal view

Received before yesterday

SQL Operators: 6 Different Types (w/ 45 Code Examples)

16 December 2025 at 19:31

SQL operators are the building blocks behind almost every SQL query you’ll ever write. Whether you’re filtering rows, comparing values, performing calculations, or matching text patterns, operators are what make your queries actually do something.

In this guide, we’ll break down six different types of SQL operators, explain what each one does, and walk through 45 practical code examples so you can see exactly how they work in real queries. The goal isn’t just to list operators. It’s to help you understand when and why to use them.

And because everyone learns differently, if reading examples isn’t your preferred learning style, you can also practice these concepts hands on with our interactive SQL courses, which let you run queries directly in your browser. Try them for free here.

Let’s start with the basics.

What are SQL operators?

A SQL operator is a symbol or keyword that tells the database to perform a specific operation. These operations can range from basic math, like addition and subtraction, to comparisons, logical conditions, and string matching.

You can think of SQL operators as the tools that control how data is compared, calculated, filtered, and combined inside a query.

In this article, we’ll cover six types of SQL operators: Arithmetic, Bitwise, Comparison, Compound, Logical, and String.

Arithmetic operators

Arithmetic operators are used for mathematical operations on numerical data, such as adding or subtracting.

+ (Addition)

The + symbol adds two numbers together.

SELECT 10 + 10;

- (Subtraction)

The - symbol subtracts one number from another.

SELECT 10 - 10;

* (Multiplication)

The * symbol multiples two numbers together.

SELECT 10 * 10;

/ (Division)

The / symbol divides one number by another.

SELECT 10 / 10;

% (Remainder/Modulus)

The % symbol (sometimes referred to as Modulus) returns the remainder of one number divided by another.

SELECT 10 % 10;

Bitwise operators

A bitwise operator performs bit manipulation between two expressions of the integer data type. Bitwise operators convert the integers into binary bits and then perform the AND (& symbol), OR (|, ^) or NOT (~) operation on each individual bit, before finally converting the binary result back into an integer.

Just a quick reminder: a binary number in computing is a number made up of 0s and 1s.

& (Bitwise AND)

The & symbol (Bitwise AND) compares each individual bit in a value with its corresponding bit in the other value. In the following example, we are using just single bits. Because the value of @BitOne is different to @BitTwo, a 0 is returned.

DECLARE @BitOne BIT = 1
DECLARE @BitTwo BIT = 0
SELECT @BitOne & @BitTwo;

But what if we make the value of both the same? In this instance, it would return a 1.

DECLARE @BitOne BIT = 1
DECLARE @BitTwo BIT = 1
SELECT @BitOne & @BitTwo;

Obviously this is just for variables that are type BIT. What would happen if we started using numbers instead? Take the example below:

DECLARE @BitOne INT = 230
DECLARE @BitTwo INT = 210
SELECT @BitOne & @BitTwo;

The answer returned here would be 194.

You might be thinking, “How on earth is it 194?!” and that’s perfectly understandable. To explain why, we first need to convert the two numbers into their binary form:

@BitOne (230) - 11100110
@BitTwo (210) - 11010010

Now, we have to go through each bit and compare (so the 1st bit in @BitOne and the 1st bit in @BitTwo). If both numbers are 1, we record a 1. If one or both are 0, then we record a 0:

@BitOne (230) - 11100110
@BitTwo (210) - 11010010
Result        - 11000000

The binary we are left with is 11000000, which if you google is equal to a numeric value of 194.

Confused yet? Don’t worry! Bitwise operators can be confusing to understand, but they’re rarely used in practice.

&= (Bitwise AND Assignment)

The &= symbol (Bitwise AND Assignment) does the same as the Bitwise AND (&) operator but then sets the value of a variable to the result that is returned.

| (Bitwise OR)

The | symbol (Bitwise OR) performs a bitwise logical OR operation between two values. Let’s revisit our example from before:

DECLARE @BitOne INT = 230
DECLARE @BitTwo INT = 210
SELECT @BitOne | @BitTwo;

In this instance, we have to go through each bit again and compare, but this time if EITHER number is a 1, then we record a 1. If both are 0, then we record a 0:

@BitOne (230) - 11100110
@BitTwo (210) - 11010010
Result        - 11110110

The binary we are left with is 11110110, which equals a numeric value of 246.

|= (Bitwise OR Assignment)

The |= symbol (Bitwise OR Assignment) does the same as the Bitwise OR (|) operator but then sets the value of a variable to the result that is returned.

^ (Bitwise exclusive OR)

The ^ symbol (Bitwise exclusive OR) performs a bitwise logical OR operation between two values.

DECLARE @BitOne INT = 230
DECLARE @BitTwo INT = 210
SELECT @BitOne ^ @BitTwo;

In this example, we compare each bit and return 1 if one, but NOT both bits are equal to 1.

@BitOne (230) - 11100110
@BitTwo (210) - 11010010
Result        - 00110100

The binary we are left with is 00110100, which equals a numeric value of 34.

^= (Bitwise exclusive OR Assignment)

The ^= symbol (Bitwise exclusive OR Assignment) does the same as the Bitwise exclusive OR (^) operator but then sets the value of a variable to the result that is returned.

Comparison operators

A comparison operator is used to compare two values and test whether they are the same.

= (Equal to)

The = symbol is used to filter results that equal a certain value. In the below example, this query will return all customers that have an age of 20.

SELECT * FROM customers
WHERE age = 20;

!= (Not equal to)

The != symbol is used to filter results that do not equal a certain value. In the below example, this query will return all customers that don't have an age of 20.

SELECT * FROM customers
WHERE age != 20;

> (Greater than)

The > symbol is used to filter results where a column’s value is greater than the queried value. In the below example, this query will return all customers that have an age above 20.

SELECT * FROM customers
WHERE age > 20;

!> (Not greater than)

The !> symbol is used to filter results where a column’s value is not greater than the queried value. In the below example, this query will return all customers that do not have an age above 20.

SELECT * FROM customers
WHERE age !> 20;

< (Less than)

The < symbol is used to filter results where a column’s value is less than the queried value. In the below example, this query will return all customers that have an age below 20.

SELECT * FROM customers
WHERE age < 20;

!< (Not less than)

The !< symbol is used to filter results where a column’s value is not less than the queried value. In the below example, this query will return all customers that do not have an age below 20.

SELECT * FROM customers
WHERE age !< 20;

>= (Greater than or equal to)

The >= symbol is used to filter results where a column’s value is greater than or equal to the queried value. In the below example, this query will return all customers that have an age equal to or above 20.

SELECT * FROM customers
WHERE age >= 20;

<= (Less than or equal to)

The <= symbol is used to filter results where a column’s value is less than or equal to the queried value. In the below example, this query will return all customers that have an age equal to or below 20.

SELECT * FROM customers
WHERE age <= 20;

<> (Not equal to)

The <> symbol performs the exact same operation as the != symbol and is used to filter results that do not equal a certain value. You can use either, but <> is the SQL-92 standard.

SELECT * FROM customers
WHERE age <> 20;

Compound operators

Compound operators perform an operation on a variable and then set the result of the variable to the result of the operation. Think of it as doing a = a (+,-,*,etc) b.

+= (Add equals)

The += operator will add a value to the original value and store the result in the original value. The below example sets a value of 10, then adds 5 to the value and prints the result (15).

DECLARE @addValue int = 10
SET @addValue += 5
PRINT CAST(@addvalue AS VARCHAR);

This can also be used on strings. The below example will concatenate two strings together and print “dataquest”.

DECLARE @addString VARCHAR(50) = “data”
SET @addString += “quest”
PRINT @addString;

-= (Subtract equals)

The -= operator will subtract a value from the original value and store the result in the original value. The below example sets a value of 10, then subtracts 5 from the value and prints the result (5).

DECLARE @addValue int = 10
SET @addValue -= 5
PRINT CAST(@addvalue AS VARCHAR);

*= (Multiply equals)

The *= operator will multiple a value by the original value and store the result in the original value. The below example sets a value of 10, then multiplies it by 5 and prints the result (50).

DECLARE @addValue int = 10
SET @addValue *= 5
PRINT CAST(@addvalue AS VARCHAR);

/= (Divide equals)

The /= operator will divide a value by the original value and store the result in the original value. The below example sets a value of 10, then divides it by 5 and prints the result (2).

DECLARE @addValue int = 10
SET @addValue /= 5
PRINT CAST(@addvalue AS VARCHAR);

%= (Modulo equals)

The %= operator will divide a value by the original value and store the remainder in the original value. The below example sets a value of 25, then divides by 5 and prints the result (0).

DECLARE @addValue int = 10
SET @addValue %= 5
PRINT CAST(@addvalue AS VARCHAR);

Logical operators

Logical operators are those that return true or false, such as the AND operator, which returns true when both expressions are met.

ALL

The ALL operator returns TRUE if all of the subquery values meet the specified condition. In the below example, we are filtering all users who have an age that is greater than the highest age of users in London.

SELECT first_name, last_name, age, location
FROM users
WHERE age > ALL (SELECT age FROM users WHERE location = ‘London’);

ANY/SOME

The ANY operator returns TRUE if any of the subquery values meet the specified condition. In the below example, we are filtering all products which have any record in the orders table. The SOME operator achieves the same result.

SELECT product_name
FROM products
WHERE product_id > ANY (SELECT product_id FROM orders);

AND

The AND operator returns TRUE if all of the conditions separated by AND are true. In the below example, we are filtering users that have an age of 20 and a location of London.

SELECT *
FROM users
WHERE age = 20 AND location = ‘London’;

BETWEEN

The BETWEEN operator filters your query to only return results that fit a specified range.

SELECT *
FROM users
WHERE age BETWEEN 20 AND 30;

EXISTS

The EXISTS operator is used to filter data by looking for the presence of any record in a subquery.

SELECT name
FROM customers
WHERE EXISTS
(SELECT order FROM ORDERS WHERE customer_id = 1);

IN

The IN operator includes multiple values set into the WHERE clause.

SELECT *
FROM users
WHERE first_name IN (‘Bob’, ‘Fred’, ‘Harry’);

LIKE

The LIKE operator searches for a specified pattern in a column. (For more information on how/why the % is used here, see the section on the wildcard character operator).

SELECT *
FROM users
WHERE first_name LIKE ‘%Bob%’;

NOT

The NOT operator returns results if the condition or conditions are not true.

SELECT *
FROM users
WHERE first_name NOT IN (‘Bob’, ‘Fred’, ‘Harry’);

OR

The OR operator returns TRUE if any of the conditions separated by OR are true.In the below example, we are filtering users that have an age of 20 or a location of London.

SELECT *
FROM users
WHERE age = 20 OR location = ‘London’;

IS NULL

The IS NULL operator is used to filter results with a value of NULL.

SELECT *
FROM users
WHERE age IS NULL;

String operators

String operators are primarily used for string concatenation (combining two or more strings together) and string pattern matching.

+ (String concatenation)

The + operator can be used to combine two or more strings together. The below example would output ‘dataquest’.

SELECT ‘data’ + ‘quest’;

+= (String concatenation assignment)

The += is used to combine two or more strings and store the result in the original variable. The below example sets a variable of ‘data’, then adds ‘quest’ to it, giving the original variable a value of ‘dataquest’.

DECLARE @strVar VARCHAR(50)
SET @strVar = ‘data’
SET @strVar += ‘quest’
PRINT @strVar;

% (Wildcard)

The % symbol - sometimes referred to as the wildcard character - is used to match any string of zero or more characters. The wildcard can be used as either a prefix or a suffix. In the below example, the query would return any user with a first name that starts with ‘dan’.

SELECT *
FROM users
WHERE first_name LIKE ‘dan%’;

[] (Character(s) matches)

The [] is used to match any character within the specific range or set that is specified between the square brackets. In the below example, we are searching for any users that have a first name that begins with a d and a second character that is somewhere in the range c to r.

SELECT *
FROM users
WHERE first_name LIKE ‘d[c-r]%’’;

[^] (Character(s) not to match)

The [^] is used to match any character that is not within the specific range or set that is specified between the square brackets. In the below example, we are searching for any users that have a first name that begins with a d and a second character that is not a.

SELECT *
FROM users
WHERE first_name LIKE ‘d[^a]%’’;

_ (Wildcard match one character)

The _ symbol - sometimes referred to as the underscore character - is used to match any single character in a string comparison operation. In the below example, we are searching for any users that have a first that begins with a d and has a third character that is n. The second character can be any letter.

SELECT *
FROM users
WHERE first_name LIKE ‘d_n%’;

More helpful SQL resources:

Or, try the best SQL learning resource of all: interactive SQL courses you can take right in your browser. Sign up for a FREE account and start learning!

Install PostgreSQL 14.7 on Ubuntu

4 November 2025 at 22:23

In this tutorial, you'll learn how to install PostgreSQL 14.7 on your Ubuntu system. The process is straightforward and consists of the following steps:

  1. Update your system packages
  2. Install PostgreSQL
  3. Set up the superuser
  4. Download the Northwind PostgreSQL SQL file
  5. Create a new Database
  6. Import the Northwind SQL file
  7. Verify the Northwind database installation
  8. Connect to the Database Using Jupyter Notebook

Prerequisites

To follow this tutorial, you should be running Ubuntu 20.04 LTS or later.

Step 1: Update System Packages

First, you need to update the system packages. Open the Terminal app ("Ctrl + Alt + T") and enter the following command:

sudo apt update && sudo apt upgrade -y

Enter your admin password when prompted. This command will update the package lists for upgrades for packages that need upgrading, as well as new packages that have just come to the repositories, and then upgrade the currently installed packages. The -y option will automatically answer 'yes' to all prompts, making the process non-interactive.

Note: sudo is a prefix that gives you superuser permissions for a command, which is often necessary when making system-wide changes like installing or upgrading software. Be careful when using sudo, as it provides complete control over your system, including the ability to break it if misused.

Step 2: Install PostgreSQL

With the system packages updated, you're ready to install PostgreSQL.

To install the PostgreSQL package, use the apt package manager:

sudo apt install postgresql-14

You may be prompted to confirm the amount of space the installation requires on your local system. After the installation is complete, check the status of the PostgreSQL service:

systemctl status postgresql

When you run this command, it will display information such as whether the service is active or inactive, when it was started, the process ID, and recent log entries. You'll know that it has been installed successfully if you see a line similar to Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled) indicating system has successfully read the PostgreSQL service file.

After you run systemctl status postgresql, you should find yourself back at the command prompt. If not, and you're stuck in a view of log files, you might be in a "less" or "more" program that lets you scroll through the logs. You can typically exit this view and return to the command prompt by pressing q. If that doesn't work, then "Ctrl + C" will send an interrupt signal to the current process and return you to the command line.

Step 3: Setting up the postgres user

PostgreSQL automatically creates a user (also known as a "role") named postgres. To ensure you'll be able to use PostgreSQL without any issues, let’s create a password for this user that has superuser privileges. You can set a password for this user with this command:

sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'your_password';"

Replace your_password with a new password and make sure it is wrapped in single quotes. Please note, this is not your local user account's password. This password will be used to connect to your PostgreSQL database with superuser privileges, so make sure it's strong and secure. This command will run the psql command as the postgres user, and pass it a SQL command to change the postgres user's password to your_password.

In PostgreSQL, the terms "USER" and "ROLE" are essentially interchangeable. The ALTER USER command is actually an alias for ALTER ROLE, which is why you see ALTER ROLE as the confirmation message.

So when you see ALTER ROLE, it just means that the password change was successful and the postgres role (or user, in everyday terms) has a new password. You're now able to use this new password to connect to PostgreSQL as the postgres user.

Step 4: Download the Northwind PostgreSQL SQL file

First, you need to download a version of the Northwind database that's compatible with PostgreSQL. You can find an adapted version on GitHub. To download the SQL file, follow these two steps:

  1. From the Terminal, create a new directory for the Northwind database and navigate to it:

    mkdir northwind && cd northwind
  2. Download the Northwind PostgreSQL SQL file using wget:

    wget https://raw.githubusercontent.com/pthom/northwind_psql/master/northwind.sql

    This will download the northwind.sql file to the northwind directory you created above.

Step 5: Create a new PostgreSQL database

Before importing the Northwind SQL file, you must create a new PostgreSQL database. Follow these three steps:

  1. Connect to the PostgreSQL server as the postgres user:

    sudo -u postgres psql

    This command is telling the system to execute the psql command as the postgres user. psql is the interactive terminal for PostgreSQL, and when it starts, it changes the command prompt to let you know that you're interacting with the PostgreSQL command-line and not the system command-line.

    Once you've run sudo -u postgres psql, your terminal prompt will change to something similar to postgres=# to indicate you're connected to the postgres database.

  2. Create a new database called northwind:

    postgres=# CREATE DATABASE northwind;

    You'll see "CREATE DATABASE" is returned if the command is successful.

  3. Exit the psql command-line interface:

    postgres=# \q

Step 6: Import the Northwind SQL file

With the northwind database created, you can import the Northwind SQL file using psql. Follow these steps:

  • In your Terminal, ensure you're in the northwind directory where you downloaded the northwind.sql file.
  • Run the following command to import the Northwind SQL file into the northwind database:

    sudo -u postgres psql -d northwind -f northwind.sql

    This command connects to the PostgreSQL server as the postgres user, selects the northwind database, and executes the SQL commands in the northwind.sql file.

Step 7: Verify the Northwind database installation

To verify that the Northwind database has been installed correctly, follow these four steps:

  1. Connect to the northwind database using psql:

    sudo -u postgres psql -d northwind
  2. List the tables in the Northwind database:

    northwind=# \dt

    You should see a list of Northwind tables: categories, customers, employees, orders, and more.

  3. Run a sample query to ensure the data has been imported correctly. For example, you can query the customers table:

    northwind=# SELECT * FROM customers LIMIT 5;

    This should return the first five rows from the customers table. Similar to above when you used systemctl status postgresql, you might be in a "less" or "more" program that lets you scroll through the results of the query. Press q to return to the psql command-line interface.

  4. Exit the psql command-line interface:

    northwind=# \q

Step 8: Connect to the Database Using Jupyter Notebook

As we wrap up our installation, we will now introduce Jupyter Notebook as one of the tools available for executing SQL queries and analyzing the Northwind database. Jupyter Notebook offers a convenient and interactive platform that simplifies the visualization and sharing of query results, but it's important to note that it is an optional step. You can also access Postgres through other means. However, we highly recommend using Jupyter Notebook for its numerous benefits and enhanced user experience.

To set up the necessary tools and establish a connection to the Northwind database, here is an overview of what each step will do:

  • !pip install ipython-sql: This command installs the ipython-sql package. This package enables you to write SQL queries directly in your Jupyter Notebook, making it easier to execute and visualize the results of your queries within the notebook environment.
  • %load_ext sql: This magic command loads the sql extension for IPython. By loading this extension, you can use the SQL magic commands, such as %sql and %%sql, to run SQL queries directly in the Jupyter Notebook cells.
  • %sql postgresql://postgres@localhost:5432/northwind: This command establishes a connection to the Northwind database using the PostgreSQL database system. The connection string has the following format:

    postgresql://username@hostname:port/database_name

    • In this case, username is postgres, hostname is localhost, port is 5432, and database_name is northwind. The %sql magic command allows you to run a single-line SQL query in the Jupyter Notebook.
  1. Copy the following text into a code cell in the Jupyter Notebook:

    !pip install ipython-sql
    %load_ext sql
    %sql postgresql://postgres@localhost:5432/northwind
  2. Run the cell by either:

    • Clicking the "Run" button on the menu bar.
    • Using the keyboard shortcut: Shift + Enter or Ctrl + Enter.
  3. Upon successful connection, you should see an output similar to the following:

    'Connected: postgres@northwind'

    This output confirms that you are now connected to the Northwind database, and you can proceed with the guided project in your Jupyter Notebook environment.

Once you execute these commands, you'll be connected to the Northwind database, and you can start writing SQL queries in your Jupyter Notebook using the %sql or %%sql magic commands.

Next Steps

Based on what you've accomplished, here are some potential next steps to continue your learning journey:

  1. Deepen Your SQL Knowledge:
    • Try formulating more complex queries on the Northwind database to improve your SQL skills. These could include joins, subqueries, and aggregations.
    • Understand the design of the Northwind database: inspect the tables, their relationships, and how data is structured.
  2. Experiment with Database Management:
    • Learn how to backup and restore databases in PostgreSQL. Try creating a backup of your Northwind database.
    • Explore different ways to optimize your PostgreSQL database performance like indexing and query optimization.
  3. Integration with Python:
    • Learn how to use psycopg2, a popular PostgreSQL adapter for Python, to interact with your database programmatically.
    • Experiment with ORM (Object-Relational Mapping) libraries like SQLAlchemy to manage your database using Python.

Install PostgreSQL 14.7 on Windows 10

4 November 2025 at 22:21

In this tutorial, you'll learn how to install PostgreSQL 14.7 on Windows 10.

The process is straightforward and consists of the following steps:

  1. Install PostgreSQL
  2. Configure Environment Variables
  3. Verify the Installation
  4. Download the Northwind PostgreSQL SQL file
  5. Create a New PostgreSQL Database
  6. Import the Northwind SQL file
  7. Verify the Northwind database installation
  8. Connect to the Database Using Jupyter Notebook

Prerequisites

  • A computer running Windows 10
  • Internet connection
  1. Download the official PostgreSQL 14.7 at https://get.enterprisedb.com/postgresql/postgresql-14.7-2-windows-x64.exe
  2. Save the installer executable to your computer and run the installer.

Note: We recommend version 14.7 because it is commonly used. There are newer versions available, but their features vary substantially!

Step 1: Install PostgreSQL

We're about to initiate a vital part of this project - installing and configuring PostgreSQL.

Throughout this process, you'll define critical settings like the installation directory, components, data directory, and the initial 'postgres' user password. This password grants administrative access to your PostgreSQL system. Additionally, you'll choose the default port for connections and the database cluster locale.

Each choice affects your system's operation, file storage, available tools, and security. We're here to guide you through each decision to ensure optimal system functioning.

  1. In the PostgreSQL Setup Wizard, click Next to begin the installation process.

  2. Accept the default installation directory or choose a different directory by clicking Browse. Click Next to continue.

  3. Choose the components you want to install (e.g., PostgreSQL Server, pgAdmin 4 (optional), Stack Builder (optional), Command Line Tools), and click Next.

  4. Select the data directory for storing your databases and click Next.

  5. Set a password for the PostgreSQL “postgres” user and click Next.

    • There will be some points where you're asked to enter a password in the command prompt. It's important to note that for security reasons, as you type your password, no characters will appear on the screen. This standard security feature is designed to prevent anyone from looking over your shoulder and seeing your password. So, when you're prompted for your password, don't be alarmed if you don't see any response on the screen as you type. Enter your password and press 'Enter'. Most systems will allow you to re-enter the password if you make a mistake.

    • Remember, it's crucial to remember the password you set during the installation, as you'll need it to connect to your PostgreSQL databases in the future.

  6. Choose the default port number (5432) or specify a different port, then click Next.

  7. Select the locale to be used by the new database cluster and click Next.

  8. Review the installation settings and click Next to start the installation process. The installation may take a few minutes.

  9. Once the installation is complete, click Finish to close the Setup Wizard.

Step 2: Configure Environment Variables

Next, we're going to configure environment variables on your Windows system. Why are we doing this? Well, environment variables are a powerful feature of operating systems that allow us to specify values - like directory locations - that can be used by multiple applications. In our case, we need to ensure that our system can locate the PostgreSQL executable files stored in the "bin" folder of the PostgreSQL directory.

By adding the PostgreSQL "bin" folder path to the system's PATH environment variable, we're telling our operating system where to find these executables. This means you'll be able to run PostgreSQL commands directly from the command line, no matter what directory you're in, because the system will know where to find the necessary files. This makes working with PostgreSQL more convenient and opens up the possibility of running scripts that interact with PostgreSQL.

Now, let's get started with the steps to configure your environment variables on Windows!

  1. On the Windows taskbar, right-click the Windows icon and select System.

  2. Click on Advanced system settings in the left pane.

  3. In the System Properties dialog, click on the Environment Variables button.

  4. Under the System Variables section, scroll down and find the Path variable. Click on it to select it, then click the Edit button.

  5. In the Edit environment variable dialog, click the New button and add the path to the PostgreSQL bin folder, typically C:\Program Files\PostgreSQL\14\bin.

  6. Click OK to close the "Edit environment variable" dialog, then click OK again to close the "Environment Variables" dialog, and finally click OK to close the "System Properties" dialog.

Step 3: Verify the Installation

After going through the installation and configuration process, it's essential to verify that PostgreSQL is correctly installed and accessible. This gives us the assurance that the software is properly set up and ready to use, which can save us from troubleshooting issues later when we start interacting with databases.

If something went wrong during installation, this verification process will help you spot the problem early before creating or managing databases.

Now, let's go through the steps to verify your PostgreSQL installation.

  1. Open the Command Prompt by pressing Win + R, typing cmd, and pressing Enter.
  2. Type psql --version and press Enter. You should see the PostgreSQL version number you installed if the installation was successful.
  3. To connect to the PostgreSQL server, type psql -U postgres and press Enter.
  4. When prompted, enter the password you set for the postgres user during installation. You should now see the postgres=# prompt, indicating you are connected to the PostgreSQL server.

Step 4: Download the Northwind PostgreSQL SQL File

Now, we're going to introduce you to the Northwind database and help you download it. The Northwind database is a sample database originally provided by Microsoft for its Access Database Management System. It's based on a fictitious company named "Northwind Traders," and it contains data on their customers, orders, products, suppliers, and other aspects of the business. In our case, we'll be working with a version of Northwind that has been adapted for PostgreSQL.

The following steps will guide you on how to download this PostgreSQL-compatible version of the Northwind database from GitHub to your local machine. Let's get started:

First, you need to download a version of the Northwind database that's compatible with PostgreSQL. You can find an adapted version on GitHub. To download the SQL file, follow these steps:

  1. Open Command Prompt or PowerShell.
  2. Create a new directory for the Northwind database and navigate to it:

    mkdir northwind
    cd northwind
  3. Download the Northwind PostgreSQL SQL file using curl:

    curl -O https://raw.githubusercontent.com/pthom/northwind_psql/master/northwind.sql

    This will download the northwind.sql file to the northwind directory you created.

Step 5: Create a New PostgreSQL Database

Now that we've downloaded the Northwind SQL file, it's time to prepare our PostgreSQL server to host this data. The next steps will guide you in creating a new database on your PostgreSQL server, a crucial prerequisite before importing the Northwind SQL file.

Creating a dedicated database for the Northwind data is good practice as it isolates these data from other databases in your PostgreSQL server, facilitating better organization and management of your data. These steps involve connecting to the PostgreSQL server as the postgres user, creating the northwind database, and then exiting the PostgreSQL command-line interface.

Let's proceed with creating your new database:

  1. Connect to the PostgreSQL server as the postgres user:

    psql -U postgres
  2. Create a new database called northwind:

    postgres=# CREATE DATABASE northwind;
  3. Exit the psql command-line interface:

    postgres=# \q

Step 6: Import the Northwind SQL File

We're now ready to import the Northwind SQL file into our newly created northwind database. This step is crucial as it populates our database with the data from the Northwind SQL file, which we will use for our PostgreSQL learning journey.

These instructions guide you through the process of ensuring you're in the correct directory in your Terminal and executing the command to import the SQL file. This command will connect to the PostgreSQL server, target the northwind database, and run the SQL commands contained in the northwind.sql file.

Let's move ahead and breathe life into our northwind database with the data it needs!

With the northwind database created, you can import the Northwind SQL file using the psql command. Follow these steps:

  1. In your Terminal, ensure you're in the northwind directory where you downloaded the northwind.sql file.
  2. Run the following command to import the Northwind SQL file into the northwind database:

    psql -U postgres -d northwind -f northwind.sql

    This command connects to the PostgreSQL server as the postgres user, selects the northwind database, and executes the SQL commands in the northwind.sql file.

Step 7: Verify the Northwind Database Installation

You've successfully created your northwind database and imported the Northwind SQL file. Next, we must ensure everything was installed correctly, and our database is ready for use.

These upcoming steps will guide you on connecting to your northwind database, listing its tables, running a sample query, and finally, exiting the command-line interface. Checking the tables and running a sample query will give you a sneak peek into the data you now have and verify that the data was imported correctly. This means we can ensure everything is in order before diving into more complex operations and analyses.

To verify that the Northwind database has been installed correctly, follow these steps:

  1. Connect to the northwind database using psql:

    psql -U postgres -d northwind
  2. List the tables in the Northwind database:

    postgres=# \dt

    You should see a list of Northwind tables: categories, customers, employees, orders, and more.

  3. Run a sample query to ensure the data has been imported correctly. For example, you can query the customers table:

    postgres=# SELECT * FROM customers LIMIT 5;

    This should return the first five rows from the customers table.

  4. Exit the psql command-line interface:

    postgres=# \q

Congratulations! You've successfully installed the Northwind database in PostgreSQL using an SQL file and psql.

Step 8: Connect to the Database Using Jupyter Notebook

As we wrap up our installation, we will now introduce Jupyter Notebook as one of the tools available for executing SQL queries and analyzing the Northwind database. Jupyter Notebook offers a convenient and interactive platform that simplifies the visualization and sharing of query results, but it's important to note that it is an optional step. You can also access Postgres through other means. However, we highly recommend using Jupyter Notebook for its numerous benefits and enhanced user experience.

To set up the necessary tools and establish a connection to the Northwind database, here is an overview of what each step will do:

  1. !pip install ipython-sql: This command installs the ipython-sql package. This package enables you to write SQL queries directly in your Jupyter Notebook, making it easier to execute and visualize the results of your queries within the notebook environment.

  2. %sql postgresql://postgres@localhost:5432/northwind: This command establishes a connection to the Northwind database using the PostgreSQL database system. The connection string has the following format:

    postgresql://username@hostname:port/database_name

    In this case, username is postgres, hostname is localhost, port is 5432, and database_name is northwind. The %sql magic command allows you to run a single-line SQL query in the Jupyter Notebook.

  3. Copy the following text into a code cell in the Jupyter Notebook:

    !pip install ipython-sql
    %load_ext sql
    %sql postgresql://postgres@localhost:5432/northwind 

    On Windows you may need to try the following command because you need to provide the password you set for the “postgres” user during installation:

    %sql postgresql://postgres:{password}@localhost:5432/northwind

    Bear in mind that it's considered best practice not to include sensitive information like passwords directly in files that could be shared or accidentally exposed. Instead, you can store your password securely using environment variables or a password management system (we'll link to some resources at the end of this guide if you are interested in doing this).

  4. Run the cell by either:

    • Clicking the "Run" button on the menu bar.
    • Using the keyboard shortcut: Shift + Enter or Ctrl + Enter.
  5. Upon successful connection, you should see an output similar to the following:

    'Connected: postgres@northwind'

    This output confirms that you are now connected to the Northwind database, and you can proceed with the guided project in your Jupyter Notebook environment.

Once you execute these commands, you'll be connected to the Northwind database, and you can start writing SQL queries in your Jupyter Notebook using the %sql or %%sql magic commands.

Next Steps

Based on what you've accomplished, here are some potential next steps to continue your learning journey:

  1. Deepen Your SQL Knowledge:
    • Try formulating more complex queries on the Northwind database to improve your SQL skills. These could include joins, subqueries, and aggregations.
    • Understand the design of the Northwind database: inspect the tables, their relationships, and how data is structured.
  2. Experiment with Database Management:
    • Learn how to backup and restore databases in PostgreSQL. Try creating a backup of your Northwind database.
    • Explore different ways to optimize your PostgreSQL database performance like indexing and query optimization.
  3. Integration with Python:
    • Learn how to use psycopg2, a popular PostgreSQL adapter for Python, to interact with your database programmatically.
    • Experiment with ORM (Object-Relational Mapping) libraries like SQLAlchemy to manage your database using Python.
  4. Security and Best Practices:
    • Learn about database security principles and apply them to your PostgreSQL setup.
    • Understand best practices for storing sensitive information, like using .env files for environment variables.
    • For more guidance on securely storing passwords, you might find the following resources helpful:

Install PostgreSQL 14.7 on MacOS

4 November 2025 at 22:07

In this tutorial, you'll learn how to install PostgreSQL 14.7 on your MacBook using Homebrew, a popular package manager for macOS.
The process is straightforward and consists of the following steps:

  1. Install Homebrew
  2. Install PostgreSQL
  3. Download the Northwind PostgreSQL SQL file
  4. Create a New PostgreSQL Database
  5. Import the Northwind SQL file
  6. Verify the Northwind database installation
  7. Connecting to the Database Using Jupyter Notebook

Prerequisites

You'll need a MacBook or iMac running macOS 10.13 or later to follow this tutorial.

Install Xcode Command Line Tools
First, you need to install the Xcode Command Line Tools, which provide essential tools for building software on your Mac.

  1. Open the Terminal app (you can find it in Applications > Utilities) and enter the following command:
xcode-select --install

A pop-up window will appear, prompting you to install the Command Line Tools. Click on "Install" to proceed. Once the installation is complete, you can move on to the next step.

Step 1: Install Homebrew

With the Xcode Command Line Tools installed, you can now install Homebrew itself. Homebrew is a package manager for macOS that will make it easier for us to install PostgreSQL and manage other software packages.

After installing Homebrew, it's important to add it to your system's PATH. By doing this, we're telling the system where to find the Homebrew executables. This means you can run Homebrew commands directly from any location in your Terminal.

We will then verify the successful installation of Homebrew using the version check command. This crucial step confirms that Homebrew has been correctly installed and is accessible via your Terminal.

Now, let's get started with the installation of Homebrew and its addition to your system's PATH.

1. Copy and paste the following command into the Terminal app

The script will automatically download and install Homebrew on your Mac. You might be prompted to enter your admin password during the installation process. After the installation is complete, you will see a message saying, "Installation successful!"

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

2. Add Homebrew to Your PATH

Follow the steps below to complete the Homebrew installation:

(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/user_name/.zprofile

This command appends the necessary line to your .zprofile file to load Homebrew into your PATH. Replace /Users/user_name with your actual user directory.

3. Running the command

Now, run the second command:

eval "$(/opt/homebrew/bin/brew shellenv)"

This command loads the Homebrew environment variables into your current Terminal session.

4. Verify the installation

To verify your Homebrew installation, run the following command:

brew --version

This should display the Homebrew version number, confirming that it's installed and available in your PATH.

Step 2: Install PostgreSQL

In this step, we will utilize Homebrew to set up PostgreSQL on your macOS system. The steps will guide you through updating Homebrew to guarantee that we're accessing the latest software packages. Next, we'll install PostgreSQL version 14 using a single Homebrew command, and start the PostgreSQL service, getting the database server up and running.

Finally, we'll secure our PostgreSQL installation by creating a new user (or "role") called postgres with superuser privileges. This user will serve as our primary means of interacting with our PostgreSQL server, granting us broad administrative capabilities. Now, let's dive into these steps:

1. Ensure Homebrew is Installed

Make sure you have Homebrew installed. If not, you can install it using the following command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

2. Update Homebrew

Update Homebrew to ensure you have the latest package information

brew update

3. Install PostgreSQL 14

Install PostgreSQL 14 using Homebrew by entering the following command:

brew install postgresql@14

4. Start PostgreSQL Service

After the installation process is done, start the PostgreSQL service:

brew services start postgresql@14

You should see a message indicating that PostgreSQL has started successfully:

Successfully started postgresql@14

5. Verify PostgreSQL Installation
To ensure PostgreSQL is installed correctly, check the version:

psql --version

6. Create a PostgreSQL User

To ensure you will be able to use PostgreSQL without any issues, let’s create a new PostgreSQL user (also called a "role") named postgres with superuser privileges:

createuser -s postgres

7. Set a Password for the postgres User

For security purposes, set a password for the postgres user:

psql
\password postgres

8. Configure PostgreSQL Environment

Add PostgreSQL to your PATH by adding the following line to your shell profile (~/.zshrc or ~/.bash_profile):

export PATH="/usr/local/opt/postgresql@14/bin:$PATH"

Then, reload your profile:

source ~/.zshrc   # or source ~/.bash_profile

9. Troubleshooting Tips

If the PostgreSQL service does not start, check the logs for errors:

tail -f /usr/local/var/log/postgres.log

Ensure your system has enough resources and dependencies for PostgreSQL.

Step 3: Download the Northwind PostgreSQL SQL File

Now, we're going to introduce you to the Northwind database and help you download it. The Northwind database is a sample database originally provided by Microsoft for its Access Database Management System. It's based on a fictitious company named "Northwind Traders," and it contains data on their customers, orders, products, suppliers, and other aspects of the business. In our case, we'll be working with a version of Northwind that has been adapted for PostgreSQL.

The following steps will guide you on how to download this PostgreSQL-compatible version of the Northwind database from GitHub to your local machine. Let's get started:

First, you need to download a version of the Northwind database that's compatible with PostgreSQL. You can find an adapted version on GitHub. To download the SQL file, follow these steps:

  1. Open your Terminal application.

  2. Create a new directory for the Northwind database and navigate to it:

    mkdir northwind && cd northwind
  3. Download the Northwind PostgreSQL SQL file using curl:

    curl -O https://raw.githubusercontent.com/pthom/northwind_psql/master/northwind.sql

    This will download the northwind.sql file to the northwind directory you created.

Step 4: Create a New PostgreSQL Database

Now that we've downloaded the Northwind SQL file, it's time to prepare our PostgreSQL server to host this data. The next steps will guide you in creating a new database on your PostgreSQL server, a crucial prerequisite before importing the Northwind SQL file.

Creating a dedicated database for the Northwind data is good practice as it isolates these data from other databases in your PostgreSQL server, facilitating better organization and management of your data. These steps involve connecting to the PostgreSQL server as the postgres user, creating the northwind database, and then exiting the PostgreSQL command-line interface.

Let's proceed with creating your new database:

  1. Connect to the PostgreSQL server as the postgres user:

    psql -U postgres
  2. Create a new database called northwind:

    postgres=# CREATE DATABASE northwind;
  3. Exit the psql command-line interface:

    postgres=# \q

Step 5: Import the Northwind SQL File

We're now ready to import the Northwind SQL file into our newly created northwind database. This step is crucial as it populates our database with the data from the Northwind SQL file, which we will use for our PostgreSQL learning journey.

These instructions guide you through the process of ensuring you're in the correct directory in your Terminal and executing the command to import the SQL file. This command will connect to the PostgreSQL server, target the northwind database, and run the SQL commands contained in the northwind.sql file.

Let's move ahead and breathe life into our northwind database with the data it needs!

With the northwind database created, you can import the Northwind SQL file using psql. Follow these steps:

  1. In your Terminal, ensure you're in the northwind directory where you downloaded the northwind.sql file.
  2. Run the following command to import the Northwind SQL file into the northwind database:
    psql -U postgres -d northwind -f northwind.sql

    This command connects to the PostgreSQL server as the postgres user, selects the northwind database, and executes the SQL commands in the northwind.sql file.

Step 6: Verify the Northwind Database Installation

You've successfully created your northwind database and imported the Northwind SQL file. Next, we must ensure everything was installed correctly, and our database is ready for use.

These upcoming steps will guide you on connecting to your northwind database, listing its tables, running a sample query, and finally, exiting the command-line interface. Checking the tables and running a sample query will give you a sneak peek into the data you now have and verify that the data was imported correctly. This means we can ensure everything is in order before diving into more complex operations and analyses.

To verify that the Northwind database has been installed correctly, follow these steps:

  1. Connect to the northwind database using psql:

    psql -U postgres -d northwind
  2. List the tables in the Northwind database:

    postgres=# \dt

    You should see a list of Northwind tables: categories, customers, employees, orders, and more.

  3. Run a sample query to ensure the data has been imported correctly. For example, you can query the customers table:

    postgres=# SELECT * FROM customers LIMIT 5;

    This should return the first five rows from the customers table.

  4. Exit the psql command-line interface:

    postgres=# \q

Congratulations! You've successfully installed the Northwind database in PostgreSQL using an SQL file and psql.

Step 7: Connect to the Database Using Jupyter Notebook

As we wrap up our installation, we will now introduce Jupyter Notebook as one of the tools available for executing SQL queries and analyzing the Northwind database. Jupyter Notebook offers a convenient and interactive platform that simplifies the visualization and sharing of query results, but it's important to note that it is an optional step. You can also access Postgres through other means. However, we highly recommend using Jupyter Notebook for its numerous benefits and enhanced user experience.

To set up the necessary tools and establish a connection to the Northwind database, here is an overview of what each step will do:

  1. !pip install ipython-sql: This command installs the ipython-sql package. This package enables you to write SQL queries directly in your Jupyter Notebook, making it easier to execute and visualize the results of your queries within the notebook environment.

  2. %load_ext sql: This magic command loads the sql extension for IPython. By loading this extension, you can use the SQL magic commands, such as %sql and %%sql, to run SQL queries directly in the Jupyter Notebook cells.

  3. %sql postgresql://postgres@localhost:5432/northwind: This command establishes a connection to the Northwind database using the PostgreSQL database system. The connection string has the following format:

    'postgresql://username@hostname:port/database_name'

    In this case, username is postgres, hostname is localhost, port is 5432, and database_name is northwind. The %sql magic command allows you to run a single-line SQL query in the Jupyter Notebook.

  4. Copy the following text into a code cell in the Jupyter Notebook:

    !pip install ipython-sql
    %load_ext sql
    %sql postgresql://postgres@localhost:5432/northwind
  5. Run the cell by either:

    • Clicking the "Run" button on the menu bar.
    • Using the keyboard shortcut: Shift + Enter or Ctrl + Enter.
  6. Upon successful connection, you should see an output similar to the following:

    'Connected: postgres@northwind'

    This output confirms that you are now connected to the Northwind database, and you can proceed with the guided project in your Jupyter Notebook environment.

Once you execute these commands, you'll be connected to the Northwind database, and you can start writing SQL queries in your Jupyter Notebook using the %sql or %%sql magic commands.

Next Steps

Based on what you've accomplished, here are some potential next steps to continue your learning journey:

  1. Deepen Your SQL Knowledge:
    • Try formulating more complex queries on the Northwind database to improve your SQL skills. These could include joins, subqueries, and aggregations.
    • Understand the design of the Northwind database: inspect the tables, their relationships, and how data is structured.
  2. Experiment with Database Management:
    • Learn how to backup and restore databases in PostgreSQL. Try creating a backup of your Northwind database.
    • Explore different ways to optimize your PostgreSQL database performance like indexing and query optimization.
  3. Integration with Python:
    • Learn how to use psycopg2, a popular PostgreSQL adapter for Python, to interact with your database programmatically.
    • Experiment with ORM (Object-Relational Mapping) libraries like SQLAlchemy to manage your database using Python.

SQL Certification: 15 Recruiters Reveal If It’s Worth the Effort

25 July 2025 at 01:17

Will getting a SQL certification actually help you get a data job? There's a lot of conflicting answers out there, but we're here to clear the air.

In this article, we’ll dispel some of the myths regarding SQL certifications, shed light on how hiring managers view these certificates, and back up our claims with actual data. We'll also explore why SQL skills are more important than ever in the era of artificial intelligence and machine learning.

Do You Need a SQL Certification for an AI or Data Science Job?

It Depends. Learning SQL is more important than ever if you want to get a job in data, especially with the rapid advancements in artificial intelligence (AI) and machine learning (ML). For example, SQL skills are essential for accessing and preparing the massive datasets needed to train cutting-edge ML models, analyzing model performance, and deriving insights from AI outputs. But do you need an actual certificate to prove this knowledge? It depends on your desired role in the data science and AI field. 

When You DON'T Need a Certificate

Are you planning to work as a data analyst, data engineer, AI/ML engineer, or data scientist? 

Then, the answer is: No, you do not need a SQL certificate. You most certainly need SQL skills for these jobs, but a certification won’t be required. In fact, it probably won’t even help.

Here’s why.

What Hiring Managers Have to Say About SQL Certification

I interviewed several data science hiring managers, recruiters, and other professionals for our data science career guide. I asked them about the skills and qualifications they wanted to see in good job candidates for data science and AI roles.

Throughout my 200 pages of interview transcripts, the term “SQL” is mentioned a lot. It's clearly a skill that most hiring managers want to see, especially as data becomes the fuel for AI and ML models. But the terms “certification” and “certificate”? Those words don’t appear in the transcripts at all

Not a single person I spoke to thought certificates were important enough to even mention. Not even once!

In other words, the people who hire data analysts, data scientists and AI/ML engineers typically don’t care about certifications. Having a SQL certificate on your resume isn’t likely to impact their decision one way or the other.

Why Aren’t AI and Data Science Recruiters Interested in Certificates?

For starters, certificates in the industry are widely available and heavily promoted. But most AI and data science employers aren’t impressed with them. Why not? 

The short answer is that there’s no “standard” certification for SQL. Plus, there are so many different online and offline SQL certification options that employers struggle to determine whether these credentials actually mean anything, especially in the rapidly evolving fields of AI and data science.

Rather than relying on a single piece of paper that may or may not equate to actual skills, it’s easier for employers to simply look at an applicant’s project portfolio. Tangible proof of real-world experience working with SQL for AI and data science applications is a more reliable representation of skills compared to a generic certification. 

The Importance of SQL Skills for AI and Machine Learning

While certifications may not be necessary, the SQL skills they aim to validate are a requirement for anyone working with data, especially now that AI is everywhere.

Here are some of the key ways SQL powers today's most cutting-edge AI applications:

  • Training Data Preparation: ML models are only as good as the data they're trained on. SQL is used heavily in feature engineering―extracting, transforming and selecting the most predictive data attributes to optimize model performance.
  • Data Labeling and Annotation: For supervised machine learning approaches, SQL is used to efficiently label large training datasets and associated relevant metadata.
  • Model Evaluation and Optimization: Data scientists and ML engineers use SQL to pull in holdout test data, calculate performance metrics, and analyze errors to iteratively improve models.
  • Deploying AI Applications: Once a model is trained, SQL is used to feed in real-world data, return predictions, and log performance for AI systems running in production.

As you can see, SQL is an integral part of the AI workflow, from experimentation to deployment. That's why demonstrating SQL skills is so important for AI and data science jobs, even if a formal certification isn't required.

The Exception

For most roles in AI and data science, having a SQL certification isn’t necessary. But there are exceptions to this rule. 

For example, if you want to work in database administration as opposed to data science or AI/ML engineering, a certificate might be required. Likewise, if you’re looking at a very specific company or industry, getting SQL certified could be helpful.  

Which Flavor?

There are many "flavors" of SQL tied to different database systems and tools commonly used in enterprise AI and ML workflows. So, there may be official certifications associated with the specific type of SQL a company uses that are valuable, or even mandatory.

For example, if you’re applying for a database job at a company that uses Microsoft’s SQL Server to support their AI initiatives, earning one of Microsoft’s Azure Database Administrator certificates could be helpful. If you’re applying for a job at a company that uses Oracle for their AI infrastructure, getting an Oracle Database SQL certification may be required.

Cloud SQL

SQL Server certifications like Microsoft's Azure Database Administrator Associate are in high demand as more AI moves to the cloud. For companies leveraging Oracle databases for AI applications, the Oracle Autonomous Database Cloud 2025 Professional certification is highly valued.

So while database admin roles are more of an exception, even here skills and experience tend to outweigh certifications. Most AI-focused companies care mainly about your ability to efficiently manage the flow and storage of training data, not a piece of paper.

Most AI and Data Science Jobs Don’t Require Certification

Let’s be clear, though. For the vast majority of AI and data science roles, specific certifications are not usually required. The different variations of SQL rarely differ too much from “base” SQL. Thus, most employers won’t be concerned about whether you’ve mastered a particular brand’s proprietary tweaks.

As a general rule, AI and data science recruiters just want to see proof that you've got the fundamental SQL skills to access and filter datasets. Certifications don't really prove that you have a particular skill, so the best way to demonstrate your SQL knowledge on a job application is to include projects that show off your SQL mastery in an AI or data science context.

Is a SQL Certification Worth it for AI and Data Science?

It depends. Ask yourself: Is the certification program teaching you the SQL skills that are valuable for AI and data science applications, or just giving you a bullet point for your LinkedIn? The former can be worth it. The latter? Not so much. 

The price of the certification is also an important consideration. Not many people have thousands to spend on a SQL certification. Even if you do, there’s no good reason to invest that much; the return on your investment just won't be there. You can learn SQL interactively, get hands-on with real AI and data science projects, and earn a SQL certification for a much lower price on platforms like Dataquest.

What SQL Certificate Is Best?

As mentioned above, there’s a good chance you don’t need a SQL certificate. But if you do feel you need one, or you'd just like to have one, here are some of the best SQL certifications available with a focus on AI and data science applications:

Dataquest’s SQL Courses

These are great options for learning SQL for AI, data science and data analysis. You'll get hands-on with real SQL databases and we'll show you how to write queries to pull, filter, and analyze the data you need. For example, you can use the skills you'll gain to analyze the massive datasets used in cutting-edge AI and ML applications. All of our SQL courses offer certifications that you can add to your LinkedIn after you’ve completed them. They also include guided projects that you can complete and add to your GitHub and resume to showcase your SQL skills to potential employers!

If you complete the Dataquest SQL courses and want to go deeper into AI and ML, you can enroll in the Data Scientist in Python path.

Microsoft’s Azure Database Administrator Certificate

This is a great option if you're applying to database administrator jobs at companies that use Microsoft SQL Server to support their AI initiatives. The Azure certification is the newest and most relevant certification related to Microsoft SQL Server.

Oracle Database SQL Certification

This could be a good certification for anyone who’s interested in database jobs at companies that use Oracle.

Cloud Platform SQL Certifications

AWS Certified Database - Specialty: Essential if you're targeting companies that use Amazon's database services. Covers RDS, Aurora, DynamoDB, and other AWS data services. Learn more about the AWS Database Specialty certification.

Google Cloud Professional Data Engineer: Valuable for companies using BigQuery and Google's data ecosystem. BigQuery has become incredibly popular for analytics workloads. Check out the Google Cloud Data Engineer certification.

Snowflake SnowPro Core: Increasingly important as Snowflake becomes the go-to cloud data warehouse for many companies. This isn't traditional SQL, but it's SQL-based and highly relevant. Explore Snowflake's certification program.

Koenig SQL Certifications

Koenig offers a variety of SQL-related certification programs, although they tend to be quite pricey (over $1,500 USD for most programs). Most of these certifications are specific to particular database technologies (think Microsoft SQL Server) rather than being aimed at building general SQL knowledge. Thus, they’re best for those who know they’ll need training in a specific type of database for a job as a database administrator.

Are University, edX, or Coursera Certifications in SQL Too Good to Be True for AI and Data Science? 

Unfortunately, Yes.

Interested in a more general SQL certifications? You could get certified through a university-affiliated program. These certification programs are available either online or in-person. For example, there’s a Stanford program at EdX. And programs affiliated with UC Davis and the University of Michigan can be found at Coursera.

These programs appear to offer some of the prestige of a university degree without the expense or the time commitment. Unfortunately, AI and data science hiring managers don’t usually see them that way.

stanford university campus
This is Stanford University. Unfortunately, getting a Stanford certificate from EdX will not trick employers into thinking you went here.

Why Employers Aren’t Impressed with SQL Certificates from Universities

Employers know that a Stanford certificate and a Stanford degree are very different things. These programs rarely include the rigorous testing or substantial AI and data science project work that would impress recruiters. 

The Flawed University Formula for Teaching SQL

Most online university certificate programs follow a basic formula:

  • Watch video lectures to learn the material.
  • Take multiple-choice or fill-in-the-blank quizzes to test your knowledge.
  • If you complete any kind of hands-on project, it is ungraded, or graded by other learners in your cohort.

This format is immensely popular because it is the best way for universities to monetize their course material. All they have to do is record some lectures, write a few quizzes, and then hundreds of thousands of students can move through the courses with no additional effort or expense required. 

It's easy and profitable for the universities. That doesn't mean it's necessarily effective for teaching the SQL skills needed for real-world AI and data science work, though, and employers know it. 

With many of these certification providers, it’s possible to complete an online programming certification without ever having written or run a line of code! So you can see why a certification like this doesn’t hold much weight with recruiters.

How Can I Learn the SQL Skills Employers Want for AI and Data Science Jobs?

Getting hands-on experience with writing and running SQL queries is imperative for aspiring AI and data science practitioners. So is working with real-world projects. The best way to learn these critical professional skills is by doing them, not by watching a professor talk about them.

That’s why at Dataquest, we have an interactive online platform that lets you write and run real SQL queries on real data right from your browser window. As you’re learning new SQL concepts, you’ll be immediately applying them to relevant data science and AI problems. And you don't have to worry about getting stuck because Dataquest provides an AI coding assistant to answer your SLQ questions. This is hands-down the best way to learn SQL.

After each course, you’ll be asked to synthesize your new learning into a longer-form guided project. This is something that you can customize and put on your resume and GitHub once you’re finished. We’ll give you a certificate, too, but that probably won’t be the most valuable takeaway. Of course, the best way to determine if something is worth it is always to try it for yourself. At Dataquest, you can sign up for a free account and dive right into learning the SQL skills you need to succeed in the age of AI, with the help of our AI coding assistant.

dataquest sql learning platform looks like this
This is how we teach SQL at Dataquest

❌