Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Table Name is = ORDERMASTERS In Oracle SQL Developer; Please help with these que

ID: 3872361 • Letter: T

Question

Table Name is = ORDERMASTERS

In Oracle SQL Developer;

Please help with these question:

4. Customers can order from QVC either through the QVC website (QVC.com) or by calling a phone number when am infomercial is aired (On Air). The column named ORDER_PLATFORM captures this information. Also, customers can place order anytime in a 24-hours day. The ORDER_TIME column captures when the order was placed. TOTAL_LINE_AMT shows the dollar amount for each order. Write a query to show the total dollar amount that has been ordered grouped by hours (0-23), ranked by total dollar amount when the order platform is QVC.com. This query can show online customer ordering behaviors. Use the SQL Character or Text (String Processing) function to handle the ORDER_TIME column.
5. It would be interesting as well to identify monthly trend in customer ordering. Write a query to show both total order count and total dollar amount for each month in 2015. Sort the results based on the order count. Use the Oracle DATE processing functions that you can find on the Internet to process the data information in this query.

Explanation / Answer

4. Query

select sum(TOTAL_LINE_AMT)

from ORDERMASTERS

group by hours;

Explanation: It retrive the data from the database by summing the TOTAL_LINE_AMOUNT which add al the values in this colums and make them to display by grouping of hours.

5. Query

select sum(total_order_count), sum(total_order_amount) from ORDERMASTERS

where year(ord_date) = '2015' order by(total_order_count);

Explanation: It selects and display the two columns with the data as summing of total_order_count and summing of total_order_amount, that is, it adds the overall value in the total_order_count and overall value in the total_order_amount by satisfying the condition as where year must be '2015; only and also it order the display of the table by total_order_count.