Given a company id, fetch all its shops including the shops of its children companies
Budget: ₹600 – ₹1,500 INR
More details 1:1, the database is Postgres - the task is to find the list of all shops including children companies of a given company (parent company). The query needs to be as efficient as possible.