Submitted Questions

  • Count Records

    I have following table as books101 BOOK_NO BOOK_NAME AUTHOR_NAME COST CATEGORY1234 C Dennis 450 System1235 Oracle Loni 550 Database1236 Sql Loni 250 Database1237 Pl/Sql Scott 750 Database Now I want to List all the authors and book name that has more then 1 book written by them.pls help

    Pravalika

    • Jul 2nd, 2015

    Code
    1. SELECT Authorname, count(*) AS [No.of.Employees] FROM Books101
    2. GROUP BY Authorname
    3. HAVING Count(*)>=2

    Avinash

    • Jun 24th, 2012

    Select AUTHOR_NAME,BOOK_NAME from books101
    where AUTHOR_NAME in
    (select author_name from books101 group by author_name having count(*)>1);