This is a project built with Bash, PostgreSQL, and SQL to populate and query a relational database containing all FIFA World Cup matches from 1930 to 2018.
- Practice relational SQL and Bash scripting
- Perform data cleaning and automation with CSV files
- Extract useful statistics from sports data
games.csvβ Source file with match datainsert_data.shβ Bash script to populate theteamsandgamestablesqueries.shβ Bash script executing SQL queries for data analysis
- Total and average goals by winning teams and both teams
- Most goals scored by one team in a single game
- Winning teams that scored more than 2 goals
- Winner of the 2018 tournament
- Teams that played in the 2014 "Eighth-Final" round
- Unique list of all winning teams
- World Cup champions by year
- Teams whose names start with "Co"
- Bash β for automation and scripting
- PostgreSQL β as the relational database system
- SQL β for data insertion and analysis (DDL, DML, JOIN, aggregation)
- Clone the repository
git clone https://github.com/Daniele1388/worldcup-database.git - Make sure PostgreSQL is installed and accessible
- Create the
worldcupand/orworldcuptestdatabases with the correct schema - Run the data import script:
./insert_data.sh - Run the query script:
./queries.sh
This project is open-source and available under the MIT License.