SELECT
  PT.ProspectID,
  PS.ProspectName,
  S2.OptionDescription AS Origin,
  S1.OptionDescription AS Outcome,
  PT.PresentationID,
  U1.FullName AS IntroducingConsultant,
  U2.FullName AS Consultant,
  IF(COALESCE(PT.ConsultantRole, 0) = 0, 'Sales Person', 'Technical Specialist') AS ConsultantRole,
  BR.BranchName AS LabourNetBranch,
  PT.AttendanceDate,
  PT.PresentationProducts,
  PT.PresentationStage,
  PT.TimeSpent,
  PT.TimeTravelled,
  PT.DistanceTravelled,
  (
    CASE PT.TravelMode
      WHEN 0 THEN 'Other'
      WHEN 1 THEN 'Own Car'
      WHEN 2 THEN 'Company Car'
      WHEN 3 THEN 'With Client'
      ELSE CONCAT('Unknown Travel Mode [', PT.TravelMode, ']')
    END
  ) AS TravelMode
FROM
  taPresentation AS PT
    LEFT JOIN taSystemOption AS S1 ON ((S1.OptionType = 'PROSPECT-PROGRESS') AND (S1.OptionID = PT.OutcomeID))
    LEFT JOIN taProspect AS PS ON (PS.ProspectID = PT.ProspectID)
    LEFT JOIN taBranches AS BR ON (BR.BranchID = PS.LabourNetBranchID)
    LEFT JOIN taSystemOption AS S2 ON ((S2.OptionType = 'PROSPECT-ORIGIN') AND (S2.OptionID = PS.OriginID))
    LEFT JOIN taUsers AS U1 ON (U1.UserID = PS.SalesReferrerID)
    LEFT JOIN taUsers AS U2 ON (U2.UserID = PT.ConsultantID)
WHERE
  1
  @pBranchID
  @pConsultantID
  @pFromTo
