Count Records

I have following table as books101

BOOK_NO BOOK_NAME AUTHOR_NAME COST CATEGORY
1234 C Dennis 450 System
1235 Oracle Loni 550 Database
1236 Sql Loni 250 Database
1237 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

Questions by abhi.mys1111

Showing Answers 1 - 12 of 12 Answers

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);

  Was this answer useful?  Yes

Pravalika

  • Jul 2nd, 2015
 

Code
  1. SELECT Authorname, count(*) AS [No.of.Employees] FROM Books101

  2. GROUP BY Authorname

  3. HAVING Count(*)>=2

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions