Well, my answer may be incompetent, because I've read about subjunctive mood in English only today and now am trying to manually apply that concept to the Ukrainian language (there's really not so much information about that over Internet, because it makes not so much sense to regard subjunctive mood as separate category in Ukrainian).
Both subjunctive (“умовно-бажальний” or “кон'юнктивний”) and conditional (“умовний”) moods are represented in Ukrainian identically: by using past form with the word “би” (“б”). The fact that they're grammatically identical causes these concepts not to be differentiated too much: both moods are usually referred just as “conditional mood” (“умовний спосіб”) and some dictionaries even (mistakenly) pose “умовний спосіб” as equivalent to “subjunctive mood”.
Past verbs used together with “би”/“б” (to make subjunctive or condition mood) are conjugated in the same way as without “би”/“б” (indicative mood): they have number, gender (when singular) and also aspect (i.e. imperfective and perfective).
Subjunctive mood
Чого б(и) ти хотів?
Чого ти би хотів? [very, very rare]
Чого ти хотів би?
— What would you wish?
Я би поспав.
Я поспав би.
— I'd sleep [for some, at least short, time].
Я би спав і спав.
Я спав би і спав би.
— I'd sleep and sleep [for a long time].
“Б(и)”
“Би” vs “б”
“Би” and “б” are absolutely equivalent. The choice is based on aesthetic and habitual considerations (e.g. avoiding groups of sequential consonants, repetitive syllables, etc).
Position of “б(и)” within sentence
In general, Ukrainian is quite permissive about positioning of words in sentence (“я тебе кохаю”, “я кохаю тебе”, “тебе́ я кохаю”, “коха́ю тебе я”, etc — although some orders may be much more typical than others).
On my personal opinion:
- “Б(и)” never starts a sentence (subsentence).
- One typical position is the second word in a sentence (see examples above). This makes immediately clear that mood is subjunctive from the start.
- Other typical position is near (before or after) a verb.
I sometimes see (and write) “б(и)” repeated twice (e.g. once near the beginning and second time near a verb) — just because writer forgot he already inserted one “б(и)”. I don't know whether such repetition is allowed (literary) or purely a mistake. In colloquial speech repeated “б(и)” sometimes makes a speaker to look less confident (and statement — even “more contra-factual”), but this distinction is surely non-literary.
About conditional mood
Usually indicative (regular) mood is used in if-then-style sentences in Ukrainian. Still, conditional mood can be used in protasis (dependent clause, e.g. if-clause) of an if-then-style sentence. In that case:
- A statement of protasis (dependent clause, “if” clause) gets counter-factual connotation.
- Apodosis (main clause, “then” clause) requires subjunctive mood. So both clauses (protasis and apodosis) contain “б(и)” and grammatically look similar.
- If a conjunction of protasis (dependent clause, “if” clause) is “якщо” (if), then “якщо” and “б(и)” should be combined into a single word “якби”. In fact, most consider non-combining them to be a mistake (this is one of differences from Russian) — although even very respected authors sometimes don't combine. If another conjunction — for example, “коли” (when) — is used instead of “якщо”/“якби” (rare cases), no combining occurs.
Якби [якщо б] я знав, що піде дощ, я б узяв парасольку.
— If I knew that it would rain, I'd take an umbrella.
Еге ж, коли б ми всі могли передбачати майбутнє… (світ був би іншим.)
— Yep, if [literally: when] we all could predict the future… (the world would be different.)
If-then-style sentences with subjunctive mood, but without conditional mood
Note that, while using conditional mood in protasis (dependent clause) requires using subjunctive mood in apodosis (main clause), the converse isn't true: using subjunctive mood in apodosis (main clause) doesn't necessarily require using conditional mood in protasis (dependent clause). For example:
Якщо ти побачиш її, я би хотів, щоби ти передав їй мої вибачення.
— In case you see her [literally: if you will see her (future indicative)], I'd want you to transmit her my apologizes.
Negative conditional mood as implicit “regardless”
Sentences with negative conditional mood in protasis (dependent clause) and indicative (regular) mood in apodosis (main clause) are interpreted in the style “No matter <protasis statement here>, <apodosis statement here>.”
Скільки б я тобі не давав, ти все одно невдоволений.
– No matter how much I don't give to you — you're always dissatisfied.
“Щоб(и)” as rudiment of “що”+“б(и)”
Ukrainian language has a conjunction “щоб(и)” (Russian equivalent: “чтоб(ы)”). Although “щоб(и)” is never decomposed into “що” and “б(и)”, it still can be regarded as result of composition of “що” and “б(и)”, because of it's meaning, etymology and grammar.
Я хочу, щоби ти був щасливий.
— I want that you are happy.
Я куплю такий, щоб довго слугував.
— I will buy such a [product], so that [it] serve for a long time.
NB: “щоб(и)” also allows infinitive verb to be used after it: “я прийшов, щоб(и) поздоровити тебе” (“I came to celebrate you”) — but it hardly relates to the topic of subjunctives/conditionals.
Tenses
In English present subjunctive is used to indicate desire, while past and pluperfect subjunctives are used to indicate counter-factuality. In Ukrainian there's no such distinction — subjunctive and conditional moods are always build as past + “б(и)”. Time adverbials (before something, tomorrow, etc) are to be used to narrow time range.
Still, there is some restriction that some or most of verbs like “to want”/“to wish”/etc in indicative (regular) mood combine badly with things that were already counter-factual at the time of wishing: you can't say “I wish now that she had been here a year ago”, instead you should either turn the wish-verb into conditional too (“I'd wish” instead “I wish”), or choose another way of expression (e.g. “now I regret that she wasn't here a year ago” — purely indicative).