Imperfect Subjunctive

There are two complete sets of conjugations for the Spanish imperfect subjunctive.
The -RA set of conjugations is more colloquial than the -SE set.

    compr ar   beb er   viv ir
yo

él/ella/Ud.
nosotros, -as
vosotros, -as
ellos/ellas/Uds.
  compr
compr
compr
compr
compr
compr
ara
aras
ara
áramos
arais
aran
  beb
beb
beb
beb
beb
beb
iera
ieras
iera
iéramos
ierais
ieran
  viv
viv
viv
viv
viv
viv
iera
ieras
iera
iéramos
ierais
ieran
                   
yo

él/ella/Ud.
nosotros, -as
vosotros, -as
ellos/ellas/Uds.
  compr
compr
compr
compr
compr
compr
ase
ases
ase
ásemos
aseis
asen
  beb
beb
beb
beb
beb
beb
iese
ieses
iese
iésemos
ieseis
iesen
  viv
viv
viv
viv
viv
viv
iese
ieses
iese
iésemos
ieseis
iesen

Uses

The imperfect subjunctive mood is used in hypothetical situations. Eg:

Si ganara la lotería, iría a las Bahamas
If I won the lottery, I would go to the Bahamas

Si yo fuera tú, haría más deporte
If I were you, I would do more sport

The imperfect subjunctive is also used in those cases in which the subjunctive is required but the verb of the main clause is in the past tense or conditional. Eg:

Llegamos antes de que saliera el tren
We arrived before the train left

Sería major que te callases
It would be better if you kept quiet

Me habría gustado que vinierais a la fiesta
I would have liked that you had come to the party