# Redshift

## Set up a Redshift connection

When inside a workbook, click **View** > **Databases**, then click the **+** icon and follow the on-screen instructions.

![Create a Redshift connection](https://4179539225-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZqboFGZzD87nn7oPsm%2Fuploads%2Fm3FYbM6wxn0r4DkAOpy1%2FScreenshot%202023-06-30%20at%2013.59.27.png?alt=media\&token=7628d692-c577-452f-b230-73740588c9b0)

For detailed instructions, see [connect-your-data-to-workspace](https://datalab-docs.datacamp.com/connect-to-data/connect-your-data-to-workspace "mention").

If you want to experiment with Redshift without setting up a connection, you can use our sample data warehouse with online ticket sales data ([source](https://docs.aws.amazon.com/redshift/latest/dg/c_sampledb.html)).

## Query the database

You can now query the Redshift data warehouse with a [sql-cell](https://datalab-docs.datacamp.com/work/sql-cell "mention"). Select it in the **Select source** dropdown in the top left corner of a SQL cell, or select the sample Redshift data warehouse.

![Example of a SQL cell using the ticket-sales connection. The query result is available as df.](https://4179539225-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZqboFGZzD87nn7oPsm%2Fuploads%2Fjgr1ZYdO6b10faKOo3La%2Fimage.png?alt=media\&token=aa0d3579-d9fa-4975-a7bb-f5ca3272cefe)

###
