How to display 3 records of a database?

S

Steven Spits

Hi,
Basicly i want to display the names of the authors that published more
books.

This is the SQL statement you need:

SELECT TOP 3 Author, COUNT(Author) AS Total
FROM Books
GROUP BY Author
ORDER BY Total DESC

With kind regards,

Steven Spits

- - -
 
M

Miguel Dias Moura

Hello,

I am working in and ASP.net / VB web site with Access database. I have a
database of books with the following fields:

PrimaryKey; Book Title; Author

I want to display in a web page the names of the 3 Authors which appear more
often in the database.
Basicly i want to display the names of the authors that published more
books.

John Smith - 21 Books Published
Mary Dias - 15 Books Published
Jack Slater - 12 Books Published

Can you help me out?

Thank You Very Much,
Miguel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top