ZS Associates Interview Question

Write a query using the RANK() window function. And there were counter questions on these after giving solution