Question

mysql 1. Produce a list of all customer names in which the first letter of the...

mysql

1. Produce a list of all customer names in which the first letter of the first and last names is in uppercase and the rest are in lowercase. Answer:

2. Create a list of all customer numbers along with text indicating whether the customer has been referred by another customer. Display the text “NOT REFERRED” if the customer wasn’t referred to the BookStore by another customer or “REFERRED” if the customer was referred. Answer:

3. Display a list of all book titles and the percentage of markup for each book. The percentage of markup should be displayed as a whole number (that is, multiplied by 100) with no decimal position, followed by a percent sign (for example, .2793 = 28%). (The percentage of markup should reflect the difference between the retail and cost amounts as a percent of the cost.) Answer:

4. Create a list of all book titles and costs. Precede each book’s cost with asterisks so that the width of the displayed Cost field is 12. Answer:

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

1.

Select initcap(firstname), initcap(lastname) from customers

2.

Select customerNumber, NVL2(referred, 'REFERRED', 'NOT REFERRED') from customers;

3.

Select title, Round((retail - cost)/cost * 100, 0)||'%' from books;

4.

Select title, LPAD(cost,12,'*') from books;

Do ask if any doubt. Please upvote.

Add a comment
Know the answer?
Add Answer to:
mysql 1. Produce a list of all customer names in which the first letter of the...
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
  • I am using MySQL and the answers I've found previously on this site did not work....

    I am using MySQL and the answers I've found previously on this site did not work. List the customer number for each customer in the CUSTOMERS table, along with the city and state in which the customer lives. Answer: Create a list containing the publisher’s name, the person usually contacted, and the publisher’s telephone number. Rename the contact column “Contact Person” in the displayed results. (Hint: Use the PUBLISHERS table.)             Answer: List the customer number from the ORDERS table for...

  • JAVA Developing a graphical user interface in programming is paramount to being successful in the business...

    JAVA Developing a graphical user interface in programming is paramount to being successful in the business industry. This project incorporates GUI techniques with other tools that you have learned about in this class. Here is your assignment: You work for a flooring company. They have asked you to be a part of their team because they need a computer programmer, analyst, and designer to aid them in tracking customer orders. Your skills will be needed in creating a GUI program...

  • This is a website picture The html and css code is as follow And my problem is as follow use the php and mysql Northwind Customer Database Search List Records All Records CustomerName v CustomerName...

    This is a website picture The html and css code is as follow And my problem is as follow use the php and mysql Northwind Customer Database Search List Records All Records CustomerName v CustomerName ContactName Address City PostalCode Search O ASC DESC List All Records Insert Record Country List City CustomerName ContactName Address City PostalCode Country List City Find by IID Find Insert 1 <! DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN" "http:L 3-<head> 4 Kmeta http-equiv-"Content-Type" content-"text/html; charset-utf-8" />...

  • Write the following SQL statements in Microsoft Access by using the Books database from Week 2...

    Write the following SQL statements in Microsoft Access by using the Books database from Week 2 Assignment 2. Once complete, copy and paste the SQL statements in a Microsoft Word document: Write SQL statements: To update the publisher name from READ WITH US to READ FOR US To verify the updated name field for the publisher with ID 6 To make the following updates to the Publisher table (be careful with WHERE): Make Contact="John Travolta" for publisher with ID number...

  • Why does my program generate [] when viewing all guests names? ----------------------------------------------- import java.util.*; public class...

    Why does my program generate [] when viewing all guests names? ----------------------------------------------- import java.util.*; public class Delete extends Info { String name; int Id; int del; public Delete() { } public void display() { Scanner key = new Scanner(System.in); System.out.println("Input Customer Name: "); name = key.nextLine(); System.out.println("Enter ID Number: "); Id = key.nextInt(); System.out.println("Would you like to Delete? Enter 1 for yes or 2 for no. "); del = key.nextInt(); if (del == 1) { int flag = 0; //learned...

  • 1. Which step of the personal selling process did Sam engage in when, early in his...

    1. Which step of the personal selling process did Sam engage in when, early in his career, he made in-person cold calls with professors on various campuses? Sales presentation Preapproach Closing the sale Generating and qualifying leads Follow-up 2. Why is Sam most likely to have a long-term relationship with his customers? He lets professors initiate sales visits. He guarantees the cheapest prices. He earns customers’ trust and loyalty through one-on-one interactions. He closes sales as soon as possible. His...

  • I need some help with question 1??? Some of it is cut off because I lost...

    I need some help with question 1??? Some of it is cut off because I lost the paper but can you please help me with what you can see for question 1 write your best answer on the providedpever veurbest vi When creating a procedure just write something 1. Imagine you are a manager of three consultants and vouwant to keep arunning total of their value to You need a form where you can add brownie points to their running...

  • If you’re using Visual Studio Community 2015, as requested, the instructions below should be exact but...

    If you’re using Visual Studio Community 2015, as requested, the instructions below should be exact but minor discrepancies may require you to adjust. If you are attempting this assignment using another version of Visual Studio, you can expect differences in the look, feel, and/or step-by-step instructions below and you’ll have to determine the equivalent actions or operations for your version on your own. INTRODUCTION: In this assignment, you will develop some of the logic for, and then work with, the...

  • Comprehensive Problem 10-77 (LO 10-1, LO 10-2, LO 10-3, LO 10-4, LO 10-5) [The following information...

    Comprehensive Problem 10-77 (LO 10-1, LO 10-2, LO 10-3, LO 10-4, LO 10-5) [The following information applies to the questions displayed below.] While completing undergraduate school work in information systems, Dallin Bourne and Michael Banks decided to start a technology support company called eSys Answers. During year 1, they bought the following assets and incurred the following start-up fees: Year 1 Assets Computers (5-year) Office equipment (7-year) Furniture (7-year) Start-up costs Purchase Date October 30, y1 October 30, Yi October...

  • need help for solve multiple choice question... 1.The employee summary report option shows Select one: a....

    need help for solve multiple choice question... 1.The employee summary report option shows Select one: a. earnings and deductions from a paycheque b. all information entered in employee records c. wage or salary amounts d. all year-to-date totals 2.In the process of correcting a wrong employee error all but one is used – Select one: a. prepare a new entry for the correct employee b. one should remember to recalculate the taxes c. open the adjust cheque window for the...

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
ADVERTISEMENT