El Paso
Points 250
Description
The regional manager for the El Paso branch of De Monne Financial is afraid his customers might be targeted for further attacks. He would like you to find out the dollar value of all outstanding loan balances issued by employees who live in El Paso. Submit the flag as flag{$#,###.##}.
Use the MySQL database dump from Body Count.
Get the flag
We'll use the same db as before. But now we need an inner join - okay my sql is not quite good, but we'll go through this.
First we need to look at the tables we need. Therefor we could use the describe
statement.
I think we need the city from employees table (to look for el paso) and the balance rows from the loans table.
So here is, what i came up with:
select employees.city, loans.balance from loans inner join
employees on loans.employee_id = employees.employee_id WHERE employees.city like '%Paso%'
For sure you can calc that in sql too, but im struggling with that, so i use libre calc 🙂
city | balance |
---|---|
El Paso | 36509 |
El Paso | 15443 |
El Paso | 14254 |
El Paso | 39682 |
El Paso | 43864 |
El Paso | 5764 |
El Paso | 28624 |
El Paso | 35877 |
El Paso | 35668 |
El Paso | 43116 |
El Paso | 16067 |
El Paso | 47288 |
El Paso | 36116 |
El Paso | 40299 |
El Paso | 2530 |
El Paso | 35274 |
El Paso | 44463 |
El Paso | 14043 |
El Paso | 35824 |
El Paso | 27052 |
El Paso | 27597 |
El Paso | 14147 |
El Paso | 34219 |
El Paso | 39362 |
El Paso | 1911 |
El Paso | 20243 |
El Paso | 7480 |
El Paso | 37891 |
El Paso | 5776 |
El Paso | 34303 |
El Paso | 30323 |
El Paso | 26392 |
Sum | $877,401.00 |
There is the flag
flag{$877,401.00}