Unfortunately, I don't think you will earn miles for your first and last flights.
The first flight is booked as
OO4661, OO being the code for Skywest Airlines. Skywest is
not a Flying Blue partner, so flights sold as OO (rather than DL) will not earn any miles for you.
The last flight is booked as
CP5779, CP being the code for Compass Airlines. Despite their ties to Delta, Compass itself is
not a Flying Blue partner, so flights sold as CP (rather than DL) will not earn any miles for you.
The reason I say this is because of the following statement on the
Delta partner page:
You can earn Miles on all flights
marketed DL, AF, KL or SkyTeam and operated by Delta Air Lines.
Although the text at the top (reference to "Delta, Delta Shuttle, the Delta Connection carriers and its worldwide partners" perhaps suggests we can effectively consider Compass and Skymark to be Delta, the problem arises with the flight numbers under which these flights were booked. I definitely don't think that "OO" is SkyTeam - there is a greater chance that "CP" may somehow be determined as SkyTeam, but I wouldn't expect it.
Had either, or both, of these flights been sold under a DL code, then they both should have earned miles (and if you have a SkyMiles account you can perhaps try and retro-credit them there, if they don't post to your Flying Blue account, after you have flown them - I would not advise trying to "switch" numbers for different flights in advance, in case all flights then mistakenly post to the SkyMiles account).
Note: the above is just my interpretation, I have no direct experience with OO or CP flights. If anyone else can disprove all this, please let us know!