TSQL Challenge 28 - SELECT TOP N articles from each category from a SQL Server 2000 database

Posted on SQL Server Central See other posts from SQL Server Central
Published on 2010/04/19 Indexed on 2010/04/19 6:03 UTC
Read the original article Hit count: 594

Filed under:
The challenge is to write a query that returns the articles to be displayed in the home page of the website. N number of articles from each category is to be selected where N is configured in the Categories table. Each category should select the most recent N articles. ArticleID can be used to identify the most recent articles. An article with a higher number indicates a more recent article.

© SQL Server Central or respective owner