Our website offers free articles, reviews, book chapters, and dissertations for download, and each time a customer downloads one, our code makes an entry in the download table that has the titleId foreign key (to identify the product) and a time stamp of when that product was downloaded. The Title table (that the titleId refers to) then has a TypeId that specifies what type of product was downloaded (article, review, etc.).
I need to write SQL that will get the top 10 articles downloaded, but I'm not sure how to do it. How do I know how many times each article appears in the download table, and then sort the articles by the number of times it appears so that I can do a "SELECT TOP 10" statement?