Question

Sort the AccountReps table first in ascending order by the name of the account rep and...

  1. Sort the AccountReps table first in ascending order by the name of the account rep and then in descending order by total sales so Bao can quickly identify the top sellers for each rep.

Homework Answers

Answer #1

In this question we have to sort the accountreps table first in the ascending order by the name

and then descending order by total sales

so that it can be quickly identified by Bao the top sellers for each rep.

The SQL code

SELECT * FROM AccountReps
ORDER BY name ASC,
Sales DESC;

To sort we will select ORDER BY clause . For ascending order we will use ASC for names and for descending  order we will use DESC for sales.

If you have any doubt you can comment.

like if you got your answer.

Know the answer?
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
Similar Questions
Project Description: As the Human Resources Manager, you maintain employee salary data. You exported data from...
Project Description: As the Human Resources Manager, you maintain employee salary data. You exported data from the corporate database into an Excel workbook. You want to display subtotals for salary by city. For further analysis, you want to create a PivotTable to determine what the total salaries would be if employees who earn an Excellent rating get a 5% increase in salary. Finally, you want to create a PivotChart that depicts what percentage of employees earn each performance rating. Instructions:...
10. View the first compound name provided in Table 6. Follow the steps below and draw...
10. View the first compound name provided in Table 6. Follow the steps below and draw each part of the structure on a piece of paper. a. Determine the number of carbons present in the compound based on the base name. b. Draw the carbon chain and include any double or triple bonds if indicated in the suffix of the base name. c. Number each carbon. The carbons can be numbered from left to right or right to left. d....
3-students take courses. Someone design this table: Student_Course (student name, ID , SSN , course number,...
3-students take courses. Someone design this table: Student_Course (student name, ID , SSN , course number, grade, home address, course credit ) Description: ID, SSN; each one has a unique value for a given student. Given ID and course number we can get grade. Given SSN and course number we can get grade. Given ID we can get everything except grade and course credit. Given SSN we can get everything except grade and course credit. Given course number we can...
1. Write a SELECT statement to count SKUs for each department, i.e., a table of two...
1. Write a SELECT statement to count SKUs for each department, i.e., a table of two columns, departments and their SKU counts. use cape_codd; select department, count(*) from sku_data group by department ; 2. List buyers who is responsible for at least two SKUs, in three columns, department, buyer, sku count. Sort buyers by their department names in ascending order. select department, buyer, count(sku) from sku_data group by buyer ; 3. Write a SQL statement which returns all the orders....
Class-In Assignment 3: Chapters 4&5 How to retrieve data from two or more tables Exercises 1....
Class-In Assignment 3: Chapters 4&5 How to retrieve data from two or more tables Exercises 1. Write a SELECT statement that returns all columns from the Vendors table inner-joined with all columns from the Invoices table. 2. Write a SELECT statement that returns four columns: vendor_name vendor_name from the Vendors table invoice_number invoice_number from the Invoices table invoice_date invoice_date from the Invoices table balance_due invoice_total minus payment_total minus credit_total from the Invoices table The result set should have one row...
Use ONLY the classes in this list to draw a Class diagram. The diagram must show...
Use ONLY the classes in this list to draw a Class diagram. The diagram must show all the classes, their attributes, and the relationships between the classes. All the associations must have proper multiplicity constraints indicated. Note that class methods and attribute types are not required.                                                                                                               Domain classes and their attributes Order [date/time, total price, status] Account [full name, address, phone, email] SellerAccount (no attributes) BuyerAccount [credit card] Book [title, ISBN, author, publisher, asking price] BookOnOrder [quantity] Dispute [reason]...
EMPLOYEE Field Name EMP_ID EMP_LNAME EMP_MI EMP_FNAME EMP_SEX EMP_AGE EMP_SALARY EMP_HIREDATE DEPT_CODE Table: DEPARTMENT DEPT_CODE BIOL...
EMPLOYEE Field Name EMP_ID EMP_LNAME EMP_MI EMP_FNAME EMP_SEX EMP_AGE EMP_SALARY EMP_HIREDATE DEPT_CODE Table: DEPARTMENT DEPT_CODE BIOL CPTR HIST MATH RELB Data Type Text Text Text Text Text Number Currency Date/Time Text DEPT_TITLE Biology Computer Science History Mathematics Religion    Field Name DEPT_CODE DEPT_TITLE Data Type Text Text INSTRUCTIONS Use SQL commands to create the tables and enter the data shown above using MS Access. Write the following SQL statement given below: 1. 2. 3. 4. 5. 6. 7. 8. 9....
Please answer in JAVA IDS 401 Assignment 4 Deadline In order to receive full credit, this...
Please answer in JAVA IDS 401 Assignment 4 Deadline In order to receive full credit, this assignment must be submitted by the deadline on Blackboard. Submitting your assignment early is recommended, in case problems arise with the submission process. Late submissions will be accepted (but penalized 10pts for each day late) up to one week after the submission deadline. After that, assignments will not be accepted. Assignment The object of this assignment is to construct a mini-banking system that helps...
Question 2 The questions in this section are all based on the “Online Book Exchange System...
Question 2 The questions in this section are all based on the “Online Book Exchange System (EyesHaveIt.com)” Case Study on the last page of this document. Read the case study carefully before answering these questions. b) An analyst has identified all the domain classes and their attributes required for the system, as listed below. Use ONLY the classes in this list to draw a Class diagram. The diagram must show all the classes, their attributes, and the relationships between the...
I am establishing a savings account paying 6% annual return to fund a portion of my...
I am establishing a savings account paying 6% annual return to fund a portion of my son’s college tuition. I want to make a withdrawal of an equal amount from the savings at the end of each of his first 4 years of college. I will have $24,256 in the savings account when he begins college and will keep the account open for 4 years. Identify the details below that I need in order to determine the dollar amount I...