To get the Max value from one column with case statement without using any aggregate functions

  • GSquared:

    There is nothing to apologizes for. I believe your point of view was interesting though I personally am not agree with all part of it. You put your vision and got feed backs about it. (not relate to the topic 🙂 ) thats all

  • And also I still strongly believe that we should stick to the topics and if we have any comment not so relate yet not so far better start new topic that leads the dissociation on that line. This will help the other people who search for the same problem within a technical or as been said a professional forums such as this as well as some one who starts the topics to find the answer.

  • We disagree on this. You have too much passion tied up in this method of questioning someone, and it's making you attack me in a way I don't feel needs to be perpetuated.

    GSquared, my "passion" is not for the question. I could care less about the question. What roused my "passion" was your post which I quote below. I wasn't arguing whether the question was bad or good, I was arguing against your inane post. Had I not seen your post, I wouldn't have posted on this topic. In a world full of possibilities, you only see those 3? You got quite the chip on your shoulder.

    I see three possibilities here:

    1. A prior dev/DBA used oddball tricks like that, and everyone currently working there hates it, and it's a "trick question" to see if you'd continue practices that everyone hates.

    2. The person doing the interview uses oddball tricks like that, either out of miseducation, ego gratification, or "job security".

    3. The company or department has policies that force them to use oddball coding practices, probably due to Pointy-Haired-Boss Syndrome.

    If it's either 2 or 3, you don't want to work there anyway. If it's 1, then my reply would get a good reaction.

    - GSquared

  • Koen, don't bait. You know better.

    What does that make me, a troll? Give me break.

    nadabadan, please remember this is a professional forum. You may not realize this, but your written word choices come off as defensive and argumentative, without the benefit of sounding like a true debate. Perhaps in a face-to-face verbal setting, saying what you've posted would seem less intense, but it's not working with the written word.

    All I did was to point out that there could be more possibilities than the 3 listed by GSquared. I didn't get defensive until the mindless drones started piling on and getting defensive themselves. You know the ones with 10 years of SQL experience, A* Pathfinding, lisp algorithms, not to mention the many years of interviewing and being interviewed.

    I see three possibilities here:

    1. A prior dev/DBA used oddball tricks like that, and everyone currently working there hates it, and it's a "trick question" to see if you'd continue practices that everyone hates.

    2. The person doing the interview uses oddball tricks like that, either out of miseducation, ego gratification, or "job security".

    3. The company or department has policies that force them to use oddball coding practices, probably due to Pointy-Haired-Boss Syndrome.

    If it's either 2 or 3, you don't want to work there anyway. If it's 1, then my reply would get a good reaction.

    - GSquared

  • nadabadan (2/10/2011)


    I wasn't arguing whether the question was bad or good, I was arguing against your inane post. Had I not seen your post, I wouldn't have posted on this topic. In a world full of possibilities, you only see those 3? You got quite the chip on your shoulder.

    Whether or not you mean this to be, this is a personal attack and completely unprofessional. Calling someone names or insulting them is neither logical nor a proper debate tactic for a true debate (I'm not talking politics either, because that's a horse of another debate color).

    I've bolded the unnecessary word choices to show you what I mean. This response was completely uncalled for. In the future, please choose your words more carefully and with less bias then you've shown. As Craig said, it's one thing to question the ideas, quite another thing to attack the person behind the ideas.

    EDIT:

    And may I add, from your first and second posts (which both came off as confrontational from the very start):

    Or how about if you want to see how much a person REALLY knows about T-SQL or want to see their thought process.

    Screaming (capitalizing an entire word) in the first post reads as if you're insulting every single person who has responded to this thread up to the point of your first post. Or as if you're being really sarcastic to everyone. Maybe that's not what you meant, but because you wrote it that way, it came across as argumentative and defensive.

    Right and if you have 10 years of experience with T-SQL, this question would have been a breeze and you would understand the REASON for the question.

    This statement, from your second post, is entirely insulting. As if you believe you are the only intelligent person contributing to this thread. Again, you may not have meant it this way, but that's how everyone read it.

    I'm only pointing this out because quite often everyone forgets that communicating via text is not the same thing as communicating with voice. Without body language, vocal tones, and facial expressions to compare the written word to, the reader is quite often left with his or her own interpretation of the words. Which is why everyone needs to be careful of how they write their sentences.

    It's quite easy to read the word "you" as a personal pronoun instead of a generic "everyone" kind of pronoun, hence the reason your second post not only came across as defensive, argumentative and insulting, but provoked the response that it did.

    I'm sure your verbal debate skills are every bit as good as you say they are. Unfortunately, they are not translating well in written text, so please be more careful how you answer questions in the future.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • You got quite the chip on your shoulder

    Whether or not you mean this to be, this is a personal attack and completely unprofessional. Calling someone names or insulting them is neither logical nor a proper debate tactic for a true debate (I'm not talking politics either, because that's a horse of another debate color).

    It was an observation, not a personal attack.

    Or how about if you want to see how much a person REALLY knows about T-SQL or want to see their thought process.

    Screaming (capitalizing an entire word) in the first post reads as if you're insulting every single person who has responded to this thread up to the point of your first post. Or as if you're being really sarcastic to everyone. Maybe that's not what you meant, but because you wrote it that way, it came across as argumentative and defensive.

    My first post was a DIRECT response to GSquared. You could tell by the fact that I quoted GSquared's text in my reply. How that could be seen as an insult to EVERY previous post is beyond me. Also, there was NOTHING offensive about the statement. The "REALLY" in my post was referring to whether an interviewee GENUINELY understands T-SQL or has a SUPERFICIAL knowledge of it. If you read my whole post and put the REALLY in context, you would see whether it was a sarcastic or not. Any objective reader would've seen that. But you just feign objectivity and impartiality. Only if you were actively SEARCHING for "offensive" remarks, could you delude yourself int thinking that the "REALLY" in my post was insulting.

    Right and if you have 10 years of experience with T-SQL, this question would have been a breeze and you would understand the REASON for the question.

    This statement, from your second post, is entirely insulting. As if you believe you are the only intelligent person contributing to this thread. Again, you may not have meant it this way, but that's how everyone read it.

    First of all, you don't speak for everyone. So stop telling me how everyone read it. Not everyone reads as poorly as you do. My post was meant to be insulting. It was insulting to Craig and his supposed 10 years of experience. Did you read post that I was responding to? If you want sarcastic and insulting read Craig's post. The one I was responding to.

    ... or that I've been working with T-SQL for 10 years, performed rediculously difficult algorithms, but really never saw the reason to make my life harder on myself by ignoring my screwdriver to find new ways to use my hammer and wrench.

    It's quite easy to read the word "you" as a personal pronoun instead of a generic "everyone" kind of pronoun, hence the reason your second post not only came across as defensive, argumentative and insulting, but provoked the response that it did.

    That "you" was a second person singular pronoun. Not a plural. Once again, considering that I quoted Craig's post in my reply, it would've been fairly obvious. But not to you I guess.

    I'm sure your verbal debate skills are every bit as good as you say they are. quote]

    Do I detect a bit of sarcasm here?

    Or how about if you want to see how much a person REALLY knows about T-SQL or want to see their thought process. I doubt these people actually use the CASE statement to find the MAX value. But forcing someone to write a solution using CASE shows whether that person has some experience in T-SQL or just some superficial knowledge of T-SQL gleaned of a book the night before the interview.

    If you read my post carefully, all my post said was that you can glean MORE information about an interviewee's knowledge of T-SQL by having him use CASE statement rather than just typing out "SELECT MAX( column ) FROM table". It takes more knowledge of T-SQL to write what Mr.Mgoo wrote than "SELECT MAX( column ) FROM table. If you go through the posts, you will see that NOT ONE person addresses my valid and reasonable point. Rather, starting with Craig, the posts were off-topic, sarcastic and insulting. I only started getting sarcastic in response to the sarcasm direct towards me.

  • Nadabadan,

    True, Brandie may not speak for all of us, but her comments are quite valid. I do find your comments and attitude quite insulting, and displays a complete lack of professionalism.

    Telling someone they have a chip on their shoulder is not an observation, it is a personal attack.

    Capitalizing specific words is the same as yelling them in person and is also a demonstration of unprofessionalism.

    To be honest, if this is the way you would talk to me in business setting I'd walk away and find your supervisor or manager and complain about your obvious unprofessional manner.

    How you have been communicating with us is not acceptable in my humble opinion, and I'm sure there are others that would agree with me.

    Perhaps you should ask a collegue what he things of your posts, not just those of the others on this thread.

  • Lynn Pettis (2/11/2011)


    Nadabadan,

    True, Brandie may not speak for all of us, but her comments are quite valid. I do find your comments and attitude quite insulting, and displays a complete lack of professionalism.

    Telling someone they have a chip on their shoulder is not an observation, it is a personal attack.

    If professionalism is lacking here, I'm not the only one to blame. I find your comment insulting and unprofessional. What are you saying that hasn't been said before. Just mindless drones parroting each other at this point.

    Capitalizing specific words is the same as yelling them in person and is also a demonstration of unprofessionalism.

    TYPING IN CAPS IS YELLING. That's a no-no. When one capitalizes a word in a sentence, it's more for EMPHASIS. Try reading out my post out loud and see if "REALLY" comes across as yelling.

    To be honest, if this is the way you would talk to me in business setting I'd walk away and find your supervisor or manager and complain about your obvious unprofessional manner.

    As I've stated before, I didn't START the "unprofessional manner". I just went with the flow.

    How you have been communicating with us is not acceptable in my humble opinion, and I'm sure there are others that would agree with me.

    Who is us? Am I dealing with a brain-dead hivemind here?

    Perhaps you should ask a collegue what he things of your posts, not just those of the others on this thread.

    I never asked those on this thread what they thought about my posts, so why would I ask a colleague what he thinks. Instead of worrying about what other people think, maybe you should focus on the points being made here. Not one person has actually said anything about the point I made. Instead you just cry about some nonsense about a capitalized word. Where's the professionalism in that?

  • Nadabadan,

    I'm curious what you find insulting about my post? I have reread it and don't see where I called you any names? I pointed out what I believe was your unprofessional behaviour, which is not the same thing as calling you names.

    Are we a brain-dead hive mind? No, we aren't. If many of us are saying the same thing, it could be cause we believe the same thing. Is that really that hard for you to believe? Trust me, we don't always agree on things, but when it comes to supporting each other when we believe that some one is behaving in an inapproriate manner, we do show solidarity.

    Again, I have read this entire thread, several times, and the only posts I personally find to be unprofessional are yours. You have directly called individuals a variety of names, and insulted their character.

    As I said before, if this is how you would treat me in a face to face professional environment, I would walk away until you could treat me in a more professional manner. What I have seen so far reminds me of spoiled child, and trust me, I have seen that behaviour in my own children at times.

    Before you get "insulted", please be sure to note I was talking about your behaviour, not you personally, there is a difference.

    Just to provide an example, telling a person that they are acting like a jerk, is not the same thing as saying they are a jerk. The first is addressing their behaviour, while the later is a personal attack. See the difference?

  • nadabadan (2/11/2011)


    If professionalism is lacking here, I'm not the only one to blame. I find your comment insulting and unprofessional. What are you saying that hasn't been said before. Just mindless drones parroting each other at this point.

    You found that already insulting? Boy, you have some long toes.

    If that is an insult, than is every manager giving feedback to employees about unprofessional behaviour actually insulting them? Interesting...

    nadabadan (2/11/2011)


    TYPING IN CAPS IS YELLING. That's a no-no. When one capitalizes a word in a sentence, it's more for EMPHASIS. Try reading out my post out loud and see if "REALLY" comes across as yelling.

    Nope, putting words in bold, italic or in another font is emphasizing. Or if you want to make it ugly, underline it.

    Putting words in caps in text that is supposed to resemble dialog, it is yelling. I don't know if you can, but I can speak a sentence and yell only one word of it.

    (It takes years of practice)

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • You found that already insulting? Boy, you have some long toes.

    If that is an insult, than is every manager giving feedback to employees about unprofessional behaviour actually insulting them? Interesting...

    It's just as interesting as the likes of you finding what I posted as insulting. I guess what we have here is a failure to communicate.

    nadabadan (2/11/2011)


    TYPING IN CAPS IS YELLING. That's a no-no. When one capitalizes a word in a sentence, it's more for EMPHASIS. Try reading out my post out loud and see if "REALLY" comes across as yelling.

    Nope, putting words in bold, italic or in another font is emphasizing.

    That's is your OPINION. LIKE I SAID, TYPING IN ALL CAPS IS SCREAMING. But putting ONE word in caps is similar to using bold, italics, etc. It's used for emphasis.

  • I'm curious what you find insulting about my post? I have reread it and don't see where I called you any names? I pointed out what I believe was your unprofessional behaviour, which is not the same thing as calling you names.[/quote[

    What I find insulting is you and your kind getting "insulted" over something that has NOTHING to do with you and over something that isn't insulting in the first place.

    Are we a brain-dead hive mind? No, we aren't. If many of us are saying the same thing, it could be cause we believe the same thing. Is that really that hard for you to believe?

    Sure you are. Not one of you said anything about others saying insulting things. But you go to EXTREME lengths to find something to nitpick. If you find "REALLY" insulting or if you find "chip on your shoulders" offensive, then you are just looking for something to be upset about.

    Again, I have read this entire thread, several times, and the only posts I personally find to be unprofessional are yours. You have directly called individuals a variety of names, and insulted their character.

    Once again, what is there to find unprofessional. I made a pertinent point about one post by GSquared. Then Craig and the rest of you took it off on a tangent. How about you stick to the topic on hand instead of nagging me about "unprofessionalism". You and I have a different view on what professionalism is.

    As I said before, if this is how you would treat me in a face to face professional environment, I would walk away until you could treat me in a more professional manner. What I have seen so far reminds me of spoiled child, and trust me, I have seen that behaviour in my own children at times.

    Treated you? You inserted yourself into this thread and kept on spewing nonsense. What have you added except repeating what others have said.

    Before you get "insulted", please be sure to note I was talking about your behaviour, not you personally, there is a difference.Just to provide an example, telling a person that they are acting like a jerk, is not the same thing as saying they are a jerk. The first is addressing their behaviour, while the later is a personal attack. See the difference?

    And saying someone has a chip on their shoulders is an observation. Not a personal attack. If you view it as a personal attack, then the problem lies with you, not me.

  • Nadabadan, since it's me you're aggravated with, perhaps we should discuss it further. PM me if you'd like to do it privately, or simply respond here publically. I'm fine with it either way, those whom I respect have given up on trying to salvage this situation.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • Craig Farrell (2/12/2011)


    Nadabadan, since it's me you're aggravated with, perhaps we should discuss it further. PM me if you'd like to do it privately, or simply respond here publically. I'm fine with it either way, those whom I respect have given up on trying to salvage this situation.

    I'm more aggravated at the mindless horde who have decided to inject themselves into this thread. One found my post to be insulting ( I have no idea how ) and so naturally the other lemmings followed suit. They contributed nothing but drivel to this thread. Read my post to GSquared and then read your post to me. Other than you went off on a tangent, whereas I made an actual point, our posts were similar in tone and format. Your post mirrored mine. And yet, only my post was insulting? Frankly, I'm done with this thread. If people are bothered by "REALLY" or "chip on your shoulder", they need to grow up. There's a bit too much group-think and drama for such "professional" members of a SQL forum.

  • nadabadan (2/12/2011)


    Craig Farrell (2/12/2011)


    Nadabadan, since it's me you're aggravated with, perhaps we should discuss it further. PM me if you'd like to do it privately, or simply respond here publically. I'm fine with it either way, those whom I respect have given up on trying to salvage this situation.

    I'm more aggravated at the mindless horde who have decided to inject themselves into this thread. One found my post to be insulting ( I have no idea how ) and so naturally the other lemmings followed suit. They contributed nothing but drivel to this thread. Read my post to GSquared and then read your post to me. Other than you went off on a tangent, whereas I made an actual point, our posts were similar in tone and format. Your post mirrored mine. And yet, only my post was insulting? Frankly, I'm done with this thread. If people are bothered by "REALLY" or "chip on your shoulder", they need to grow up. There's a bit too much group-think and drama for such "professional" members of a SQL forum.

    As I see it, Nadabadan, you demonstrated clearly many posts back that you were incapable of normal courteous debate and were not prepared to accept that anyone who disagreed with you even to the slightest extent might be at leat partially right. You were rude, offensive, and disgracefully unprofessional. You have continued this behaviour through many subsequent posts. You ignore all normal conventions of civilised discussion and display your arrogance and disgraceful disregard for the normal conventions of polite debate at every opportunity. Several people have tried politely and courteously to point out to you that your behaviour is not suitable in a professional forum, and you have taken it upon yourself to to insult each one of them in the most offensive and disgraceful manner. If any professional institute of which I am a member had the misfortune to count you as a member I would now be seriously considering whether I should ask that institute to consider whether you were a fit person to be a professional member, since the codes of ethics and professional behaviour that they require of professional members are clearly either beyond your capacity or beyond your willingness to conform to any such code.

    Tom

Viewing 15 posts - 46 through 60 (of 76 total)

You must be logged in to reply to this topic. Login to reply