Maybe I was just really tired from putting together my toolbox, but I couldn’t figure out why my initial query didn’t work last night when I was debugging the SQL for the Extend Firefox Finalists Page. The original SQL query would not sort the result set based on v.vid DESC and I would receive the same v.version everytime (the smallest one).
I fixed it with a subselect to ensure we were pulling the max v.vid per main.id, but the original query still bugs me. So if anybody has any comments or ideas about why the initial one was borked, I’m curious to find out.
If you stare at something long enough, the solution disappears and instead you find yourself staring at a pretty unicorn.