Verisk Interview Question

SQL questions for example top x grouped by y. But it required some joins