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.
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.
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.
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.
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.
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.
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 your system. |
| Want to start over | Run 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.retailmart from scratch.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.