Top 5 From Per group in one Select?

  • "Self-ridicule is quite fine..."..except that's probably the only time that the less people that are in agreement with you, the better for your morale...

    Make sure you don't do too much of that when you're around RGR'us 'cos he only twists the knife in deeper and laughs while doing so...(don't shoot remi..)







    **ASCII stupid question, get a stupid ANSI !!!**

  • Would you be trying to invent me a fourth life Sue?? cause I don't have time for time right now .

  • "fourth life"........???????????? you get one from shooting me ??????????







    **ASCII stupid question, get a stupid ANSI !!!**

  • >> "he only twists the knife in deeper and laughs while doing so."

  • aah - you only do that with people you know well (unfortunately)...I spoke from personal experience when I said that...

    However, I should've qualified it with a ...he only does it to a select few...

    ps:'kay - think I've wasted 'nuff time today & I too am operating on a time-crunch! "see" you around later...







    **ASCII stupid question, get a stupid ANSI !!!**

  • At the risk of repeating myself

     

    SELECT  A.Store_id, A.Store, A.Region, A.[% Chg Cap],A.[% Chg Rad]

     FROM Performance_Variance A

     WHERE A.[% chg RAD]< 0

       AND A.Month_end = '2005-09-14 23:59:59'

       AND A.Level = 'store'

       AND A.store_id IN

      (SELECT TOP 5 B.store_id

       FROM Performance_Variance B

       WHERE B.region = A.region

       ORDER BY B.[% Chg Cap] (OR whatever other criteria you want to use to determine the top))

Viewing 6 posts - 16 through 20 (of 20 total)

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