André Restivo

Bicycles SQL Exercises

  1. What riders belong to the team 'Os Velozes'? (name)
  2. What rider won the 'Porto – Aveiro' stage? (name)
  3. What riders raced the 'Coimbra – Lisboa' stage and what was their final position? Order the answer by their position. (name, position)
  4. How many riders are there on each team? (team, total)
  5. What is the total sum of times of each rider? (name, total)
  6. What team, or teams, has a smaller sum of its riders' total time? (team)
  7. What is the average time in each stage? (description, average)
  8. What stage, or stages, had the smaller average time? (description)
  9. What was the time difference between the first and second riders in each stage? (description, difference)
  10. What stage had the biggest time difference between the first and second rider to finish it, what rider won that stage and with how much lead time. (description, name, difference).