Results 1 to 2 of 2

Thread: Top 3 Issue

  1. #1
    Join Date
    Mar 2003
    Posts
    225

    Unanswered: Top 3 Issue

    trying to run a query that highlights the top 3 problems on a specific line by week number.

    i have the sql to sort it by top 3 but the trouble i have is, that it only then shows me the top 3 events for 3 weeks.

    i want to show the top 3 problems for each week.

    current sql is :


    SELECT TOP 3 top3_byTime.EventCode, top3_byTime.CodeDescription, top3_byTime.total, top3_byTime.Occur, top3_byTime.Line, top3_byTime.WeekNumber
    FROM top3_byTime
    ORDER BY top3_byTime.total DESC;



    please help

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: Top 3 Issue

    Originally posted by Chimp8471
    trying to run a query that highlights the top 3 problems on a specific line by week number.

    i have the sql to sort it by top 3 but the trouble i have is, that it only then shows me the top 3 events for 3 weeks.

    i want to show the top 3 problems for each week.

    current sql is :


    SELECT TOP 3 top3_byTime.EventCode, top3_byTime.CodeDescription, top3_byTime.total, top3_byTime.Occur, top3_byTime.Line, top3_byTime.WeekNumber
    FROM top3_byTime
    ORDER BY top3_byTime.total DESC;

    please help
    GROUP BY top3_byTime.WeekNumber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •