Welcome to Smogon! Take a moment to read the Introduction to Smogon for a run-down on everything Smogon, and make sure you take some time to read the global rules.
Assuming that the first hit is done on the switch, Hydro Pump gets the Analytic boost, because when the opponent switches out, it counts as you playing last.