Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use SQL Developer to write the queries below. Write a query that displays the first name and last name of each author with the

Please use SQL Developer to write the queries below.

  1. Write a query that displays the first name and last name of each author with the first letters capitalized. Display the first name left justified (lined up on the left) with 12 characters and the last name right justified (lined up on the right) with 12 characters. Use aliases for the column headings and blanks to pad the data in the columns.
  2. Write a query that shows the first and last name of each customer and whether or not the customer was referred by another customer. If they were referred, display "Referred," and if not, display "Not Referred."
  3. Write a SQL query that displays the full name of the day of the week, the hour, minutes and seconds of the computer you are using.
  4. Determine the amount of profit for order number 1008. Include the book title and the profit, with the profit formatted as dollars and cents. Use the paideach and cost columns to calculate the profit, and make sure to use the quantity purchased if there was more than one book purchased.
  5. Using today's date, determine the length of time in months since each book was published. Display the title and publication date along with the number of months. Use an alias for the length of time.

Link below is for the scripts to these questions as it is too long to post here: https://www.dropbox.com/s/fm0nm9nyv6b1ts3/JLDB_Build%281%29.sql?dl=0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

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

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions