This project demonstrates basic SQL database setup, data loading, and queries for analyzing real estate sales data. It is designed as a beginner-friendly project for learning SQL.
- π Beginner SQL data analysis project
- π setup.sql
- π load_data.sql
- π queries.sql
- π sample_data.csv
- π .gitignore
- π README.md
- MySQL (any version) installed or running in Docker
- SQL client (e.g., SQLTools in VS Code, MySQL Workbench, or DataSpell)
Run setup.sql
in your SQL client to create the database and the real_estate_sales:
SOURCE path/to/setup.sql;
π‘ Tip
You can drag & drop a file to show the path!
- The repo includes sample_data.csv (10-20 rows) for testing.
- Update load_data.sql to point to your CSV location if needed.
- Run load_data.sql to populate the table:
SOURCE path/to/load_data.sql;
- Open
queries.sql
in your SQL client to run example queries. - You can modify or add queries for your own analysis.
If you prefer to use MySQL in Docker:
- Start a MySQL container:
docker run --name mysql-container -e MYSQL_ROOT_PASSWORD=yourpassword -p 3306:3306 -d mysql:9.4
π Note
You can also download the Docker desktop for Mac or Windows.
- Connect your SQL client to
localhost:3306
with the root password. - Follow the instructions above to run
setup.sql
andload_data.sql
.
- The repo includes a sample CSV for demonstration. The full dataset is excluded and should be downloaded separately if needed.
- The full dataset is available on data.gov
- All SQL scripts are structured to run on any standard MySQL setup.