https://github.com/sakthivinash2/sql_paintings_casestudy
This project explores a dataset of Famous Paintings & Museums using SQL queries to answer various analytical questions.
https://github.com/sakthivinash2/sql_paintings_casestudy
case-study paintings postgresql sql
Last synced: 2 months ago
JSON representation
This project explores a dataset of Famous Paintings & Museums using SQL queries to answer various analytical questions.
- Host: GitHub
- URL: https://github.com/sakthivinash2/sql_paintings_casestudy
- Owner: SAKTHIVINASH2
- License: apache-2.0
- Created: 2025-01-28T09:50:02.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-01-28T10:09:09.000Z (4 months ago)
- Last Synced: 2025-02-06T21:20:34.481Z (4 months ago)
- Topics: case-study, paintings, postgresql, sql
- Language: Python
- Homepage:
- Size: 56.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🎨 SQL Paintings Case Study
This project explores a dataset of **Famous Paintings & Museums** using **SQL queries** to answer various analytical questions.
## 📂 Project Structure
- **`load_csv_files.py`**: Script to load dataset CSV files into a **PostgreSQL** database.
- **`Questions.txt`**: A list of SQL problems to solve using the dataset.
- **`Solutions.txt`**: SQL queries solving the problems.
- **`SQL Paintings Casestudy - Questions.pdf`**: PDF version of the problem statements.## 📊 Dataset
The dataset used in this project can be found on **Kaggle**:
🔗 [Famous Paintings Dataset](https://www.kaggle.com/datasets/mexwell/famous-paintings)## 🛠️ Setup Instructions
1. **Database Setup**
- Install PostgreSQL and create a database named `painting`.
- Update the `conn_string` in `load_csv_files.py` with your database credentials.2. **Load Data**
- Download the dataset from the link above and place the CSV files in the appropriate directory.
- Run `load_csv_files.py` to populate the database.3. **Run Queries**
- Use the queries in `Solutions.txt` to analyze the data.## ✅ SQL Problems Covered
✔️ Find paintings that are not displayed in any museum.
✔️ Identify museums without any paintings.
✔️ Compare asking price vs. regular price of paintings.
✔️ Identify the most and least popular painting styles.
✔️ Find museums that are open every day.
✔️ Detect and remove duplicate records.
...and many more!## 📌 Additional Notes
- This project demonstrates SQL skills such as **JOINs, RANK, GROUP BY, and WINDOW functions**.
- Queries can be modified for different **business insights**.## 📜 License
This project is licensed under the **Apache License 2.0**.
See the [LICENSE](LICENSE) file for more details.---
🚀 *Happy Querying!*