u/Oh_Another_Thing

What is your most obscure piece of SQL knowledge?

I'm a bit peeved as I did a SQL test with an interviewer the other day, and the interviewer deliberately steered me away from the correct answer. It had to do with averages of salary for each manager, but 1 of the managers had no employees. You do a simple average on it, but it doesn't return an average for the manager with no employees.

I started to re-write the query to use COALESCE, which is correct, but the interviewer said that query is not returning nulls, so why would COALESCE help here.

I should have trusted myself and finished it that way, but deleted that new part and tried some other ways.

Lesson, trust your instincts, and COALESCE will let you return 0 if a category has no entries.

reddit.com
u/Oh_Another_Thing — 7 days ago

Gon is the worst character of the show

Hi, I wanted to bring up why I watched part of hunterxhunter, but lost interest, and it's because of the title.

I've watched part of it, and see a lot of YouTube shorts, and Gon is the most boring character. He is such typical Shonen protagonist, and everyone around him is so much better. Kurapika has a great story and abilities, Killua is from a family of assassins and has family issues. Netero is so much cooler, every hunter fighting the ants are more interesting, the Zoldycks fighting Chrollo is more interesting. Literally every other character is better than him.

Gon? Just trying to meet his dad and had the most boring "I never give up" protagonist mentality. Yawn.

reddit.com
u/Oh_Another_Thing — 12 days ago