Prudential interview question

Realize a SQL query using Pandas function