If we let $x=0$ be the table top and measure upwards, the bottle position is $x(t)=vt$.
Ketchup that leaves the bottle at time $t$ takes $t'$ to fall where $vt=\frac 12g(t')^2$
Ketchup that leaves the bottle at time $t$ hits the table at $t+\sqrt{\frac {2vt}g}$
At time $u$ the ketchup that just arrived at the table left the bottle at time $t$ where $u=t+\sqrt{\frac {2vt}g}$
We would like to invert this equation $$u=t+\sqrt{\frac {2vt}g}\\\\(u-t)^2=\frac {2vt}g\\\t^2-2ut-\frac {2v}gt+u^2=0\\\ t=\frac 12\left(2u+\frac {2v}g-\sqrt{(2u+\frac {2v}g)^2-4u^2}\right)$$ and the amount of ketchup at time $u$ is $Q$ times this. If $Q$ is not a constant, you need to integrate $$\int_0^{t(u)}Q(t)dt$$to get the amount on the table at time $u$