CREATE TABLE "stage_results" (
  "date" text,
  "course" text,
  "distance" text,
  "type" text,
  "winner" text
);

Question: What is the distance for the team time trial?
SQL: SELECT "distance" FROM "stage_results" WHERE "type"='team time trial';

Question: What was the course on 13 may?
SQL: SELECT "course" FROM "stage_results" WHERE "date"='13 may';

Question: What type has rest day as a course and was on 21 may?
SQL: SELECT "type" FROM "stage_results" WHERE "course"='rest day' AND "date"='21 may';