Moops

joined 1 year ago
[–] [email protected] 18 points 16 hours ago (4 children)

Like, I know it really happened. I believe that. But damn if there isn't a voice in a small corner of my mind that won't stop whispering "he faked the whole thing".

[–] [email protected] 55 points 1 day ago

You're a moron and I'm sorry for your failed upbringing.

[–] [email protected] 5 points 3 days ago (1 children)

This looks like my ex. I'm not even tryna be mean, it just does.

[–] [email protected] 33 points 5 days ago

Hard disagree. But that's okay, we're allowed to like different kinds of games. Yours isn't any more objective than mine though. If you don't like that kind of thing, just don't play those kinds of games. It's not a threat to you if others enjoy them.

[–] [email protected] 20 points 6 days ago (1 children)

Yeah this is a reach. He's a big enough turd we really don't need to stretch this much.

[–] [email protected] 30 points 2 weeks ago

What a weird little man.

[–] [email protected] 28 points 3 weeks ago (2 children)

That headline is a wild ride

[–] [email protected] 1 points 4 weeks ago* (last edited 4 weeks ago)

Yeah, I guess it's a less-used analytic function (function? I think that's the right term here).

I believe this will only accept DENSE_RANK as the ranking part of this method, which makes sense cause you want a distinct list of ranks to identify the last one. You are right though that it's possible for the record returned by the MAX() to be arbitrary if there are duplicate values in the ORDER BY field. Luckily you can usually handle for that by using multiple fields in the ORDER BY. The conditions in the query that the function operates on top of also play a roll. You can also include a PARTITION BY, but I've only needed to use that a time or two.

I think one reason I like this more is it's more readable to me. For a lot of the other analytic functions you end up using partitions and additional keywords like "ROWS BETWEEN UNBOUNDED AND ....etc." in order to break out results the way you need. With this dense_rank method I typically accomplish that using regular 'ole WHERE conditions. Of course that's gonna be pretty subjective.

Replying on in my phone now so limited in how detailed I can be. I can give better examples later if that doesn't make sense.

Edit: I think it is an Oracle thing. Analytics are one of the areas I will unapologetically use DB-specific functions. Portability be damned! Generally they've been tuned very specifically to solve a problem with the specific engine in mind. Of course that won't always be true, but that's my general thought process.

 

I had an interesting conversation at work where someone questioned my use of DENSE_RANK and suggested I use LAST_VALUE. We had a good conversation about it, but ultimately agreed to disagree about the specific scenario. My code was accurate with no performance issues warranting a rewrite. My feeling was the person I was talking too was less familiar with DENSE_RANK and so favored LAST_VALUE. I get preference, I have my own, but I try to be aware of what's preference vs. what's technically superior.

I'm curious about people's thoughts on when to use LAST_VALUE() vs MAX() KEEP(DENSE_RANK LAST ORDER BY ). To my mind, both solve a similar problem. I lean towards DENSE_RANK largely out of preference due to the syntax being shorter (literally just less characters to type), and I also like that since DENSE_RANK is an aggregate function it outputs distinct results without needing to use the DISTINCT keyword. I haven't intentionally run tests comparing the two, but anecdotally I've never noticed a performance difference between the two when writing comparable queries.

Surprisingly I couldn't really find any detailed articles or discussions online comparing these two functions and I'm curious what thoughts are out there in the wild.

[–] [email protected] 29 points 4 weeks ago (14 children)

And my vote in Oklahoma.....oh fuck it who are we kidding lol. Meaningless. I still do it though.

[–] [email protected] 13 points 1 month ago (1 children)

You sure are on a tear, aren't ya little guy?

[–] [email protected] 6 points 1 month ago* (last edited 1 month ago)

Ok but like, there was a little sip and flirt on the way wasn't there? ;)

I kid. Keep on keeping on.

[–] [email protected] 3 points 1 month ago

That was actually an interesting read. First one from a game journalist in a while lol. Crazy how much energy they spent on just one, rather small character.

view more: next ›