Question

schema book: book_id, book_name, author_id. Author: author_id, first_name, last_name. DOB, social. i am trying to write...

schema book: book_id, book_name, author_id. Author: author_id, first_name, last_name. DOB, social. i am trying to write a query that lists the first and last name of each author and counts how many books they wrote if they wrote more than one. but i am having issue . this is what i have so far, select book_name, count(b.book_name) as "number of books" from book b join author a on (b.author_id = a.author_id) group by b.book_name having count (a.author_id) >1;

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Please find the SQL query below:

Query

select first_name, last_name, count(*) as NumberOfBooks from Author a join book b on a.author_id = b.author_id group by b.author_id having count(*) > 1;

Add a comment
Know the answer?
Add Answer to:
schema book: book_id, book_name, author_id. Author: author_id, first_name, last_name. DOB, social. i am trying to write...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Do these codes look right for the following 5 statements. This is using Oracle SQL: Write...

    Do these codes look right for the following 5 statements. This is using Oracle SQL: Write a query that displays the title, ISBN, and wholesale cost of books whose wholesale cost is more than the average of all books. Format the retail price with dollars and cents. Write a query that displays the title and publication date of the oldest book in the BOOKS table. Format the date with the complete name of the month and a comma after the...

  • I am having an issue. When i press submit to test the code, it goes to...

    I am having an issue. When i press submit to test the code, it goes to a blank screen. Please, will some one assist me? Thanks! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Sign Guest Book</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> </head> <body> <?php if (empty($_POST['?rst_name']) || empty($_POST['last_name']))     echo "<p>You must enter your ?rst and last name! Click your browser's Back button to return to the Guest Book form.</p>"; else {     $DBConnect = @mysql_connect("localhost", "root", "");    ...

  • David’s Story “Life is difficult.” I once read these three trivial words in a book, but...

    David’s Story “Life is difficult.” I once read these three trivial words in a book, but never knew how true to life and impactful they would be until one fateful fall evening. Before I begin, let me back up and tell you more about who I am and how I got here. I am a Caucasian male raised in a small conservative town in Maine by hard-working middle-class parents. My compassionate mother juggled raising three rambunctious children, me being the...

  • Rachel's Story A mothers' account of raising a transgendered child Rachel's mother is the author of...

    Rachel's Story A mothers' account of raising a transgendered child Rachel's mother is the author of this story. She writes about the first few years of Rachel's life when she was known as Ryan. This is the story of how Ryan became Rachel. Rachel is a beautiful, well-adjusted, happy and healthy nine year old little girl. She likes to do all the things little girls at this age like to do. Sleepovers and ice-cream sundaes are by far her favorite...

  • Putting Your Best Cyberface Forward By STEPHANIE ROSENBLOOMJAN. 3, 2008 your nails? Have you pierced your...

    Putting Your Best Cyberface Forward By STEPHANIE ROSENBLOOMJAN. 3, 2008 your nails? Have you pierced your tongue? Is your tote bag emblazoned with the words "I'm not a plastic bag"? at the way they do for reasons too numerous to fit into any therapist's notebook. Yet we commonly shape People look and act the way they do for reasons too ir behavior or tweak our appearance in an attempt to control how others perceive us i m mon sense. Social...

  • Hi there! I need to compare two essay into 1 essay, and make it interesting and...

    Hi there! I need to compare two essay into 1 essay, and make it interesting and choose couple topics which im going to talk about in my essay FIRST ESSAY “Teaching New Worlds/New Words” bell hooks Like desire, language disrupts, refuses to be contained within boundaries. It speaks itself against our will, in words and thoughts that intrude, even violate the most private spaces of mind and body. It was in my first year of college that I read Adrienne...

  • SESSION 12 Workers for Ivanka's clothing company The reality of working in a factory making clothes...

    SESSION 12 Workers for Ivanka's clothing company The reality of working in a factory making clothes for Ivanka Trump’s label has been laid bare, with employees speaking of being paid so little they cannot live with their children, anti-union intimidation and women being offered a bonus if they don’t take time off while menstruating. The Guardian has spoken to more than a dozen workers at the fashion label’s factory in Subang, Indonesia, where employees describe being paid one of the...

  • Read “Instituionalizing our Demise: America vs Multiculturalism” by Roger Kimball on pg 268 and “Reinventing America”...

    Read “Instituionalizing our Demise: America vs Multiculturalism” by Roger Kimball on pg 268 and “Reinventing America” Call for a new national indentity” by Elizabeth Martinez on pg 275. Create a double entry notebook for each reading selection It should be atleast five observation and responses. wric 268 PART 2 essay pro. exactly how and why their authors disagree. Instead of with parties in conflict as mediators do, you will nt of view designed to appeal to both sides, mediatn posing...

  • Evaluate the arical writ the response in which you state your agreement or disagreement with writer...

    Evaluate the arical writ the response in which you state your agreement or disagreement with writer up un these questions guidelines 1) can empathy lead us astrary? how 2) our heart will always go out to the baby in the well, its a measure of our humanity. but empathy will have to yield to reason if humanity is to have a future can empathy yield to reason? how? thank you The Baby in the Well: The Case against Empathy* -Paul...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT