  Bhoria, Eyyunni and Maji recently obtained a four-parameter $q$-series
identity which gives as special cases not only all five entries of Ramanujan on
pages 354 and 355 of his second notebook but also allows them to obtain an
analytical proof of a result of Bressoud and Subbarao. Here, we obtain a finite
analogue of their identity which naturally gives finite analogues of
Ramanujan's results. Using one of these finite analogues, we deduce an identity
for a finite sum involving a ${}_2\phi_1$. This identity is then applied to
obtain a generalization of the generating function version of Andrews' famous
identity for the smallest parts function $\textup{spt}(n)$. The $q$-series
which generalizes $\sum_{n=1}^{\infty}\textup{spt}(n)q^n$ is completely
different from $S(z, q)$ considered by Andrews, Garvan and Liang. Further
applications of our identity are given. Lastly we generalize a result of
Andrews, Chan and Kim which involves the first odd moments of rank and crank.
