Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

solve this question in SQL? I already uploaded the relation between the tables. The question is how I can know : 1- how many titles

solve this question in SQL?

I already uploaded the relation between the tables.

The question is how I can know  :

1- how many titles did each publisher publish?

 

2- select the titles and royalty rate for books with a royalty greater than 0.05.  Order by the royalty rate in descending order?

 

3- Show the full name for all the authors (first and last name as a single value) and the titles for the books they wrote?

 

4- show me the publishers and the titles for all history books ?

 

5- show me the publisher name and the type of book for the title 1977
 

6-show me the sales and employee title for Lord Cooper


7- show me the name, sales and title for employees with sales greater than 500 - order by sales in ascending order?

 

8-select the titles, and publishers for books with an advance of $1,000,000.

 

9- show the title, the author's full name (first and last as a single value) for books with an advance larger than $1,000.

 

10-show the titles, publishers and the author full names (first and last as a single value) for all books.

 

VO dtakakidb titles e title_id: char(3) title_name: varchar(40) @type varchar(10) pub_id: char(3) #pages : int(11) # price: decimal(5,2) # sales : int(11) pubdate: date # contract: smallint(6) VO dtakakidb royalties @royalties_id: int(11) title_id: char(3) # advance : decimal(9,2) # royalty_rate : decimal(5,2) vodiakakidb title authors e title_id: char(3) au_id: char(3) #au_order: smallint(6) #royalty_share: decimal(5,2) Vodtakakidb publishers e pub_id: char(3) pub_name: varchar(20) @city: varchar(15) @state : char(2) country: varchar(15) O dtakakidb authors @au_id : char(3) au_fname : varchar(15) @au_Iname : varchar (15) @phone varchar(12) address : varchar(20) city: varchar(15) state : char(2) zip: char(5) Vodtakakidb empsales sales_id: int(11) @emp_id: char(3) # sales: int(11) VO dtakakidb hire @hire_id: int(11) emp_id: char(3) @emp_titlevarchar(20) boss_id: char(3) Vodtakakidb telephones phone_id: int(11) au_id: char(3) @tel_type: char(1) @tel no char(12) Vodtakakidb roadtrip @seq: int(11) city: varchar(17) #miles: double Odtakakidb pub_employees @emp_id: char(3) emp_name : varchar(20) boss_id: char(3)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

When is an outer join used instead of a natural join?

Answered: 1 week ago

Question

7.1 Describe the differences between the terms sex and gender.

Answered: 1 week ago