Capital One Interview Question

For the technical interview I got two questions, one for SQL to calculate the click-through rate and one for python about URL