top of page
Writer's pictureBryan Eckard

Analyzing World Bank Data with SQL


Analysis of International Development Association (IDA) Credits and Grants using SQL


Overview

The purpose of this project was to practice basic SQL statements and aggregate functions. IDA credits are public and publicly guaranteed debt extended by the World Bank Group. They assist their member countries by helping them meet their development needs through various funding avenues. All amounts are listed in US dollars.


Some insights I gained were:

  • The total amount due to the IDA is $20,526,620,109,947.17, and the highest amount owed is $793,256,127.64.

  • Nicaragua has 13,922 separate amounts owed for different projects.

  • Honduras has 1,444 projects with an interest rate greater than 1.

The Data

The World Bank Group dataset can be found at through the following link:

https://finances.worldbank.org/Loans-and-Credits/IDA-Statement-Of-Credits-and-Grants-Historical-Dat/tdwh-3krx . At the time of this post, it contains approximately 1.13M rows, 30 columns, and each row represents a credit or grant.


I downloaded the data as a CSV file and uploaded it to https://bit.io . This site offers serverless postgres SQL. It was quick and easy to get started with practicing SQL statements and functions.


The Analysis

To begin the analysis, I used the basic SELECT statement to query the database and make sure everything looked like it should.


SELECT

The next statements I practiced were LIMIT, Alias (AS), and WHERE:


LIMIT


AS


WHERE


Then I tried some aggregate functions (COUNT, MAX, SUM, and AVG) and used the GROUP BY and ORDER BY statements:


COUNT



The above COUNT statement was how I determined how many separate projects Nicaragua was paying for.


COUNT and GROUP BY


MAX

Determined that the most someone owes right now is $793,256,127.64.


SUM

Determined the total amount owed to World Bank Group: $20,526,620,109,947.17


AVG


ORDER BY


I finished by practicing the operators AND, OR, and NOT:


AND

Determined how many projects Honduras has over 1% interest.


OR


NOT


Final Thoughts

This project was great practice on a real-world dataset. I was able to determine some interesting information about how much is currently due to the IDA and how many projects different countries have: the total amount due to the IDA was $20,526,620,109,947.17, and the highest amount owed was $793,256,127.64; Nicaragua has 13,922 separate amounts owed for different projects; and Honduras has 1,444 projects with an interest rate greater than 1.


Thank you for reading! Please contact me below or connect with me on LinkedIn with any questions or comments.



60 views0 comments

Recent Posts

See All

Comments


bottom of page