All A-Loan

Challenge:

De Monne has reason to believe that DEADFACE will target loans issued by employees in California. It only makes sense that they'll then target the city with the highest dollar value of loans issued. Which city in California has the most money in outstanding Small Business loans? Submit the city and dollar value as the flag in this format: flag{City_$#,###.##}

Use the MySQL database dump from Body Count

Solution:

select sum(l.balance), e.city from employees e left join loans l using (employee_id) where e.state = 'CA' and l.loan_type_id = 3 group by e.city order by 1 desc;
+----------------+------------------+
| sum(l.balance) | city             |
+----------------+------------------+
|       90600.00 | Oakland          |

The compete flag is flag{Oakland_$90,600.00}.

Published:

Updated:

Leave a comment