Here's the sheet music, and a video is also available.
Limerick is a simple-sounding 18-bar piece (not counting the pickup bar) in 4/4. It's slow—at 75 bpm—and its key is F for the first 9 bars. After that things become ambiguous; and by bar 15 it's modulated to the closely-related key of C. Modulating from F to C is an example of modulating to the dominant (up a fifth), and it's done by turning 4 into #4, and then taking the dominant (5) to be the new tonic. At that point, #4 of the original key becomes 7 of the new key. Because F and C are closely-related keys, there are plenty of interesting moments of ambiguity in this piece that we can examine.
Here's a high-level overview of the chord structure (the pickup bar isn't included).
1 [I iii][vi iii]
3 [IV I][IVadd9/5 . iiadd4/5 V7]
5 [I iii][vi iii]
7 [IV V7][I]
At this point it feels like the first part of the piece has come to an end; and it was all firmly in F.
This next part feels like we're moving somewhere new. Let's see what happens.
9 [I iii7][I]
11 [V][IV IVadd9/5]
13 [Isus2 I/3][Imaj7 II/#4]
It's now a stretch to imagine ourselves still in F major. We have B natural notes in three of the bars, which alters F major to F Mixolydian (but probably not to C major quite yet, since we haven't yet cadenced to a C triad). Most of the B naturals are passing notes in the melody, so they don't show up in this high-level overview. But one of them manifests prominently in that II/#4 chord in bar 14. In the key of F, that should be ii (G minor). But here the B note is natural, so we get a II (a G major chord). That II is all ready to cadence to V which, as we'll see, it does next.
We could analyze the remaining bars in terms of the original key of F. In which case they'd be a series of Vs and Vsus4s. But that wouldn't make much sense, and it wouldn't take into account that the piece as a whole feels resolved when it ends on C in a way that it absolutely doesn't feel resolved if it were to end on F. So it seems clear that by this stage we've modulated to the V of the original key. In other words, from this point on, what we've been calling V needs to become I. And so Part 3 looks like the following.
15 [I/5 Isus4/4][I]
17 [I/5 Isus4/4][Isus4/4 I]
Next we'll go back to the start, and take a closer look.
After a C note in the bass in the pickup bar, bar 1 begins with an F chord (I) for two beats. That F's root then moves up a maj3 to Am (iii). In bar 2 that root descends (from iii) down a per5 (actually up a per4 in the score) to Dm (vi). And then immediately back up a per5 (down a per4 in the score) back to Am (iii). The roots of those three chords have spelled out the notes of a Dm triad (in first inversion in the score: F-A-D). As we've said, Dm is vi (i of the relative minor).
Those minor chords sound pleasant, but perhaps they're doing a poor job of persuading the ear that F major is the tonality. I say that because their roots (3 and 6) are modal scale degrees, and not tonal scale degrees (like 1, 4, 5, and 2 somewhat, are).
While playing that Dm (vi) chord (which is in second inversion), you hear its highest note (an F5 to be specific) as the melody, and that note is the min3 of the chord. But then when coming back to the root-position Am (iii), the highest note (an E) is the melody, and that's of course the leading-tone of F. Not sure whether (or how well) that on its own leads back toward the F note of the Bb that's to come in the next bar. But it's assisted by a D-E-F in the melody anyway.
In bar 3 (at time 0:09 in the video) that same F5 melody note is played again. But this time it belongs to a root-position Bb (IV), where that F note functions now as a stronger 5th (stronger than the b3 it was in the Dm). And in fact it does seem more impactful now as a melody note. That's followed by the tonic triad F (I). The F tonality has now been insinuated a little better (even though that tonic triad is in the middle of an odd-numbered bar, and so not a good place to stop). But that F tonality impression gets even stronger in bar 4 (plus the first half of bar 5) where IVadd9/5 (a Bb with a slightly discordant-to-the-chord but dominant-to-the-key C note in the bass) is followed by a ii-V7-I. The ii is actually a iiadd4/5 (a Gm with a slightly discordant-to-the-chord but dominant-to-the-key C note in the bass). That C in the bass then turns into the root of the V7 that follows; and the last melody note of bar 4 is 7 (the leading-tone, leading us to the tonic triad that comes next).
That ii-V7-I cadence lands on the F (I) in bar 5 (0:16). Since it's another odd-numbered bar, this is no place to stop, and the I disappears as quickly as it arrived.
Bars 5-7 are a shorter (by a bar) and simpler variation on bars 1-4. In bar 7 the phrase approaches its more hurried end with a IV-V7-I cadence, and nothing unusual in the bass this time. And the I in bar 8 (time 0:25), being an even-numbered bar, feels like we've come to a complete stop (at least, before we move on again).
That feels like pretty standard stuff, and it would sound perfectly fine to stop the piece right there. Instead, we continue, and we move into ambiguous territory.
For this part of the piece, you'll feel that a C major tonality is being established; but ambiguously so. We play a B note sometimes natural, sometimes flat (in a Bb triad). But by the time a G chord appears, we do seem to have set up a pretty unambiguous V-I cadence.
So Part 2 begins at bar 9. Let's continue the analysis in the context of the key of F.
At bar 9 (time 0:29) we move F-Am7-F (I-iii7-I). However, immediately after that Am7, the melody moves through B natural up to C. And then the F triad that follows re-uses that C.
Note that in the first half of the piece we move F (I) to second-inversion Am (iii), so the melody there features a very fleeting C note (and we do the same thing here, except with Am7). In the first half, we immediately move higher to D-E-F. Here, we stay and make more of a meal of that C, with the melody going C-B-C-C, where that last C is the highest note of the root-position F triad. Is the B-C leading to the C in that F triad? Certainly if we do an experiment where we follow that F with G7 and then C, then that feels straightforward, and not like a modulation (it even works without the G7). There's been no Bb in there, so nothing ever strongly pointed to F. So could that melody B natural be leading to C as a tonic, and not just as a chord note?
Another experiment we can do is to change that melody B-C into Bb-C, move to Dm (vi) and then step straight to F. Again that feels straightforward, and not like a modulation. Everything points to F that time, whether or not you lead up to the final F chord with a melody D-E. So there the melody goes Bb-C-D to the Dm (vi), then D-(E)-F to the F (I). In all these variations, everything seems to hinge on that B (as you'd expect, since that's the only differentiator between the parent key's Mixolydian mode and the major scale built on the parent key's dominant).
Then we move to C (V) in bar 11. So we don't go F-G7-C like we did in the first experiment we mentioned above. Instead, we hold that F (I) for a bar (thus missing our chance, really to resolve to C in the same bar and therefore with some finality), and then just drop to C. There's nothing final-sounding about that C. Then we move to Bb (IV) for a bar, and so we seem to abandon our flirting with B natural and the C tonality. We could actually in the second half of that bar of Bb move to F, and that sounds resolved. But instead we let the full bar of Bb play out (and that's bar 12). And we even throw in a C note in the bass, which if anything makes us expect an F chord even more.
That's (almost entirely) taken care of four of the six bars in this part, and we're still not entirely sure what key we're in. I say almost entirely taken care of because the end of bar 12 has a little melody motif of D-E. Now, previously, whenever the melody has moved A-G or D-E, it's landed on the root of an F chord. But now (in bar 13 at time 0:42) a D-E takes us to the G note in an Fsus2 (Isus2). It seems more like an Fsus2 than a Csus4/F, because then we seem to resolve to F/A (I/3) (with the mediant A in the bass) as that novel D-E-G melody continues on to the A of that F triad. Then we have a repeat of bar 9's B-C move. So we're back to that B natural. And like last time that B-C leads to an F chord (as in bar 10), except this time (4 bars later in bar 14) it's an Fmaj7 (Imaj7). By now the melody has continued up G-A-B-C-E, with that final E being the highest note of the Fmaj7. Also in bar 14, after two beats of that Fmaj7, we have what feels like a mini-resolution to a G major chord (II) with B in the bass. Really emphasizing that B natural again.
Those most recent chords (Fmaj7 and G) are IVmaj7 and V of C. And a IV-V cadence is sufficient to establish a tonality. So it's arguable that the ear is now perfectly primed for a C chord, and the resolution that will bring. Furthermore, the bass movement over the last two chords from that F to that B (0:47) is a tritone, and it spells out the business end of a dominant 7th (the 3rd to the fifth of a V7), which makes the ear even more anxious for a restful C chord.
Over the next two bars (beginning on bar 15) a C chord is what we get, albeit mixed in with a tantalizing Csus4, whose F note seems reluctant to let go of the tension and allow us to slip down to that C.
And maybe this is a case of "you should quit while you're ahead". Or in this case, quit while you're resolved. Because bars 17 and 18 (the coda) of the piece mess with our head a little. An octave higher, the motif of bars 15 and 16 are repeated (0:55), but this time instead of ending satisfactorily in a C chord, we go into bar 18 with a Csus4/F. It's a nod to the key of F that we started with, but it feels less like a tonic Fsus2 chord (which is made from the same notes we're playing) and more like what it is: a cheeky little Csus4. A refusal to completely resolve to C by not allowing that F to move down the minor 2nd that it wants to to E, nor the bass to move to C. But then in the last two beats of that final bar we do move the bass down to a very satisfactory C and end on that. It sounds right, and resolved. But if you prefer "cheeky", then don't play those final two C notes in the left hand. :)