J.P. Morgan Interview Question

Gave a hypothetical database problem and I was expected to write SQL query for that.