Oof it is getting cold, snow is starting to settle, the mornings are filled with frost and just the thought of going outside inspires us to jump under the covers with a hot water bottle. But there is another way to stay warm and upbeat in this tough time, and that is with the aid […]
I’ve blogged about generic ways of getting top 1 or top n per category queries before on this blog. An Oracle specific version in that post used the arcane KEEP syntax: SELECT max(actor_id) KEEP (DENSE_RANK FIRST ORDER BY c DESC, actor_id), max(first_name) KEEP (DENSE_RANK FIRST ORDER BY c DESC, actor_id), max(last_name) KEEP (DENSE_RANK FIRST ORDER […]