← Get startedSELECT * FROM Shiraverse · All Nukte
Get started › Load the dataset

Load the RetailMart dataset

Download the data, run one script, and check the numbers. About 55 tables and 2.4 million rows, in a database called retailmart. Same steps on Mac and Windows.

Jo video mein bola, yahan nukte mein likha hai.
What I said in the video, written here as key points.

▶ Watch the video

Load the dataset

Put RetailMart on your laptop

๐Ÿ”’
retailmart
55 tables, about 24 lakh rows. Read-only. Look, don't touch.
๐Ÿงช
practice
Yours. Create, break, experiment.

Asli data, apne laptop par. Real data, on your own laptop. Same steps on Mac and Windows.

Once the tools are installed, load the practice data: 55 tables and about 2.4 million rows. It goes into its own database called retailmart. Your practice database stays separate, for the tables you create yourself. Never edit the retailmart tables. The steps are the same on Mac and Windows. Only the way you open the folder differs, and this page shows both.

Step 1

Download and unzip

๐Ÿ“ฆ
select-from-shiraverse-dataset-v3.zipabout 54 MB
๐Ÿ“
csv + sqltwo folders inside

Mac: double-click. Windows: Extract All.

Download the dataset (about 54 MB) with the button below, or from the Setup page. On Mac, double-click the zip. On Windows, right-click it and choose Extract All. You get a folder that contains two folders: csv and sql.

Download dataset (54 MB)

Step 2

Go to the right folder

Terminal (Mac) or PowerShell (Windows)– □ ×
# Mac: Terminal ~ % cd ~/Downloads/select-from-shiraverse-dataset-v3 ~ % ls csv   sql # Windows: PowerShell PS> cd $HOME\Downloads\select-from-shiraverse-dataset-v3 PS> dir csv   sql

You must see csv and sql. If not, you are in the wrong folder.

Open Terminal on Mac or PowerShell on Windows and move into the unzipped folder.

Mac:

cd ~/Downloads/select-from-shiraverse-dataset-v3
ls

Windows:

cd $HOME\Downloads\select-from-shiraverse-dataset-v3
dir

The listing must show csv and sql. If it does not, you are in the wrong folder.

Step 3

Run the load script

Terminal or PowerShell– □ ×
> psql -U postgres -d postgres -f sql/setup_retailmart.sql Password for user postgres: ... loading 55 tables ... Setup Complete! Connected to retailmart

The same command on Mac and Windows. It takes about a minute. Wait for Setup Complete.

Run this on Mac or Windows. It is the same command:

psql -U postgres -d postgres -f sql/setup_retailmart.sql

It asks for your postgres password (postgres if you used our installer) and takes about a minute. You will see a "Setup Complete" message at the end. To start over at any time, run the same command again. It rebuilds the retailmart database from scratch.

Step 4

Check the numbers

Terminal or PowerShell– □ ×
> psql -U postgres -d retailmart -c "SELECT count(*) FROM sales.orders;" Password for user postgres: count -------- 150000

See 150000? All of RetailMart is there. Mubarak ho!

Run:

psql -U postgres -d retailmart -c "SELECT count(*) FROM sales.orders;"

You should see 150000. In pgAdmin 4, refresh the server list and you will see the retailmart database with 16 schemas.

If something goes wrong

Common problems

could not open file "csv/..."You are not inside the unzipped folder. List the folder and check you see csv and sql.
password authentication failedUse the password you chose during install (postgres for our installer).
psql not foundOpen a new Terminal or PowerShell window. Still no? See the check page for your system.
Want to start overRun the same load command again. It rebuilds retailmart from scratch.

Tell me exactly what the screen says. Ghabrana nahi.

  • could not open file "csv/...": you are not inside the unzipped folder. List the folder and check you see csv and sql.
  • password authentication failed: use the password you chose during install (postgres for our installer).
  • psql not found: open a new Terminal or PowerShell window. Still no? See the check page for Mac or Windows.
  • Want to start over: run the same load command again. It rebuilds retailmart from scratch.
Your turn

Did you see 150000?

sql.theshiraverse.com

Tell me in the comments. Milte hain agli video mein. Next: a tour of the database.

Free SQL course and the Setup page, which maps every step. Join the WhatsApp Community, the Channel or Discord.

→ / Space next   ← back   F fullscreen   H hide bars   N notes