Photo by Max Kukurudziak on Unsplash

Russia’s Personnel and Equipment Losses in the Russo-Ukrainian War

Jing Kai Tan

--

The invasion of Ukraine came as a shock to the entire world on the 24th of February. Since then, we have witnessed the strong resistance of Ukraine pushing back against the Russian Armed Forces. Watching these developments, I could not help but wonder, what is the cost of this war for Russia? Therefore, I went onto Kaggle, found a simple dataset containing information on the personnel and equipment losses by the Russians and used MySQL to do an analysis on the cost of this war on Russia. This article is in no way motivated by political means; it is purely meant to consolidate my learning on using MySQL as a tool for data analytics. This dataset is only accurate up till 20th April, as that was when I started my analysis.

1. Inserting the missing value for Day 1.

From Kaggle, I imported two datasets, russia_losses_personnel and russia_losses_equipment. Upon opening the ‘Personnel Loss dataset, I realized that there were no values for the first day of the war. To facilitate my analysis later, I added in a row for the first day, assuming that no personnel and POWs were taken. I used INSERT INTO to add this missing row into the table, as seen below.

Using the INSERT INTO function to add row for Day 1.

The table now has an added row for personnel losses on Day 1.

The table now has an additional value for Day 1 of the war.

2. Searching up Personnel Losses for a specific date.

To search for specific personnel losses on a particular date, I used SELECT xxx FROM xxx code and included a WHERE clause to indicate a condition, which is the specific date that I was looking up for. In this case, as I am looking for personnel losses on the 20th of April, my condition would be: DATE = ‘2022–04–20’.

Code to obtain personnel losses on a particular date.
Table obtained as a result of the code.

3. Top 5 days with the most personnel losses.

As a challenge, I tried to look for the top 5 days with the most personnel losses. To obtain differences of personnel losses between two days, I used the LAG(personnel, 1) function to shift personnel losses down a row (e.g. Day 1 > Day 2) in a separate column inside the day_before column. This would allow me to subtract between columns, as seen in the code in the death_diff column. Thereafter, I ordered the rows by death_desc in a descending order and limited rows to 5 to obtain the top 5 days with the most personnel losses.

Code to find the 5 days with most number of losses.

With this output, it is evident that the day with the most number of losses is on the 3rd of March, 2022. It had been one week since the war and despite Russia’s effort to advance in all directions, they faced strong resistance from the Ukrainian military and suffer losses, which explains the high death toll recorded on the 3rd of March.

Table containing the days with the 5 highest number of deaths from the war.

4: Creating a Stored Procedure with Day Number as an input.

I wanted to create a way to create a stored procedure to search for the deaths on any given day. Hence, I created the variable ‘e_day’ as an input for users to enter the day number, and the code will produce an output of the number of personnel loss, as well as whether the losses are greater than or around the number recorded.

Code for the Stored Procedure.

The code results in a small window, which I can simply just key in a value for the day of my interest and obtain an output of the total number of personnel losses recorded that day.

With this stored procedure, I can key in any given day and obtain the total number of troop losses recorded that day.

5. Total Loss of Personnel, Aircraft and Helicopters recorded by day.

Air superiority remains vital for any military to win a war, hence I wanted to have a table to record the loss of both personnel and military vehicles to achieve air superiority. I combined the equipment and personnel table together and used the INNER JOIN function to produce such a table.

Code to obtain a combined table for personnel, aircraft and helicopter losses.
Output from the code.

War is never good for any country or party, considering the amount of resources, lives and money that are taken away from failing to agree diplomatically on an international level. I hope that this conflict may adopt a resolution soon and for Ukraine to begin rebuilding as soon as possible, so that the lives of normal Ukrainians may revert back to normalcy.

--

--

No responses yet