Global Debt Analysis: Understanding Debt Distribution Among Developing Nations
Debt plays a crucial role in managing both individual necessities and a country's overall economy. Nations often take on debt not only for immediate necessities but also to finance large-scale infrastructure projects, economic reforms, and growth plans. Developing countries, in particular, rely on external loans to facilitate long-term development and improve living standards. The World Bank, a leading financial institution, provides such debt to these countries to ensure they can fund critical projects.
In this project, I am going to analyze international debt data collected by The World Bank. The dataset contains information about the amount of debt (in USD) owed by developing countries across several categories. You are going to find the answers to the following questions:
- What is the number of distinct countries present in the database?
- What country has the highest amount of debt?
- What country has the lowest amount of repayments?
- What are the top 5 countries with the largest debt across all categories?
- Which debt indicator accounts for the largest proportion of total debt across all countries?
Below is a description of the table you will be working with:
international_debt table
international_debt table| Column | Definition | Data Type |
|---|---|---|
| country_name | Name of the country | varchar |
| country_code | Code representing the country | varchar |
| indicator_name | Description of the debt indicator | varchar |
| indicator_code | Code representing the debt indicator | varchar |
| debt | Value of the debt indicator for the given country (in current US dollars) | float |
I will execute SQL queries to answer these questions.
Data Overview
SELECT *
FROM international_debt
LIMIT 5;How many distinct countries are represented in the dataset?
SELECT COUNT(DISTINCT country_name) AS total_distinct_countries
FROM international_debt;The dataset covers 124 countries, providing a global perspective on international debt.
Which country has the highest overall debt?
SELECT country_name, SUM(debt) AS total_debt
FROM international_debt
GROUP BY country_name
ORDER BY total_debt DESC
LIMIT 1;China has the highest total debt compared to other developing countries. This indicates that China's economic development is significantly reliant on external borrowing.
Which country has made the fewest debt repayments?
SELECT
country_name,
indicator_name,
MIN(debt) AS lowest_repayment
FROM international_debt
WHERE indicator_code='DT.AMT.DLXF.CD'
GROUP BY country_name, indicator_name
ORDER BY lowest_repayment
LIMIT 1;Timor-Leste has made the fewest debt repayments, suggesting potential economic or political challenges that limit its ability to repay external debt.
What are the top 5 countries with the largest debt across all categories?
SELECT country_name, SUM(debt) AS total_debt
FROM international_debt
GROUP BY country_name
ORDER BY total_debt DESC
LIMIT 5;