How to display 3 records of a database?

Discussion in 'ASP .Net' started by Steven Spits, Jun 4, 2004.

  1. Steven Spits

    Steven Spits Guest

    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

    - - -
     
    Steven Spits, Jun 4, 2004
    #1
    1. Advertising

  2. 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
     
    Miguel Dias Moura, Jun 5, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shapper
    Replies:
    3
    Views:
    878
    Shapper
    Apr 21, 2005
  2. Luke Airig
    Replies:
    0
    Views:
    812
    Luke Airig
    Dec 31, 2003
  3. Dan

    Delete records or update records

    Dan, May 10, 2004, in forum: ASP General
    Replies:
    1
    Views:
    474
    Ray at
    May 10, 2004
  4. Replies:
    3
    Views:
    679
    Anthony Jones
    Nov 2, 2006
  5. Patrick
    Replies:
    1
    Views:
    341
    Patrick
    Jun 8, 2006
Loading...

Share This Page