Thanks for the function. I'm at the office right now so can't really try it. I dove through the wpdb yesterday and found exactly what you're saying about format-link, etc being in prefix_term, prefix_term_relationships etc.
I could be wrong but you seem to have run into the same issue I'm faced with in your function. You first query all the non formatted post then the formatted post. What this will result in (If I'm not wrong) is posts displayed with no format first (all of them) then posts displayed with a format (all of them).
It's close, but not quite there (and where I'm getting hung up). For each day, I want to display posts in this manner. Let's take my previous example above, but go a bit further.
8 posts, 3 from Today, 3 from yesterday and 2 from 2 days ago The way I'd like it displayed is as follows (the way you'd see it when browsing the blog):
Today's Post (No Format - 6pm)
Today's Post (Format - 10pm)
Today's Post (Format - 11am)
Yesterday's Post (No Format - 3pm)
Yesterday's Post (No Format - 10am)
Yesterday's Post (Format - 7pm)
2Day's Ago Post (Format 9pm)
2Day's AGo Post (Format 2pm)
So the default chronological order is what I want, but I want to "shove" all the formatted posts (with ie: post-format-link) to the bottom of the day and leave the non-formatted post above. My reasoning is that non-formatted posts (or "Articles") as I'll call them have more weight than frivolous formatted post which is why I want them to appear on top. What I don't want is a list of let's say 10 non-formatted post (all from different days) and then 10 formatted posts (all from different days). They should still be grouped by day.