Knowee
Questions
Features
Study Tools

We need to create a report to display the order id, ship date and order total of your ORDER table. If the order has not been shipped, your report must display 'Not Shipped'. If the total is not available, your report must display 'Not Available'.In the ORDER table, the SHIPDATE column has a datatype of DATE. The TOTAL column has a datatype of INT.Which statement do you use to create this report?Select one:a.SELECT ordid,TO_CHAR(shipdate, 'Not Shipped'),TO_CHAR(total,'Not Available')FROM order;b.SELECT ordid, IFNULL(shipdate, 'Not Shipped') as SHIPDATE,Total FROM order;c.SELECT ordid, NVL(to_char(shipdate), 'Not Shipped') SHIPDATE,NVL(total,'Not Available')TOTAL FROM order;d.SELECT ordid, shipdate "Not Shipped",total "Not Available"FROM order;

Question

We need to create a report to display the order id, ship date and order total of your ORDER table. If the order has not been shipped, your report must display 'Not Shipped'. If the total is not available, your report must display 'Not Available'.In the ORDER table, the SHIPDATE column has a datatype of DATE. The TOTAL column has a datatype of INT.Which statement do you use to create this report?Select one:a.SELECT ordid,TO_CHAR(shipdate, 'Not Shipped'),TO_CHAR(total,'Not Available')FROM order;b.SELECT ordid, IFNULL(shipdate, 'Not Shipped') as SHIPDATE,Total FROM order;c.SELECT ordid, NVL(to_char(shipdate), 'Not Shipped') SHIPDATE,NVL(total,'Not Available')TOTAL FROM order;d.SELECT ordid, shipdate "Not Shipped",total "Not Available"FROM order;

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

The correct statement to create this report is:

c. SELECT ordid, NVL(to_char(shipdate), 'Not Shipped') SHIPDATE, NVL(total,'Not Available') TOTAL FROM order;

This statement uses the NVL function to replace null values. If the shipdate is null, it will display 'Not Shipped'. If the total is null, it will display 'Not Available'. The TO_CHAR function is used to convert the date to a string.

Similar Questions

We need to analyze how long your orders take to be shipped from the date that the order is placed. To do this, you must create a report that displays the customer number, date ordered, date shipped, and the number of months in whole numbers from the time the order is placed to the time the order is shipped. Which statement produces the required results?Select one:a.SELECT custid, orderdate, shipdate,ROUNDOFF(shipdate - orderdate) "Time Taken"FROM ord;b.SELECT custid, orderdate, shipdate,ROUND(DAYS_BETWEEN (shipdate, orderdate))/ 30) "Time Taken"FROM ord;c.SELECT custid, orderdate, shipdate,ROUND(MONTHS_BETWEEN (shipdate, orderdate))"Time Taken" FROM ORD;d.SELECT custid, orderdate, shipdate,MONTHS_BETWEEN (shipdate, orderdate)"Time Taken"FROM ord;

Problem StatementFrom the following table, write a query to count all the orders generated on "2012-08-17." Return the number of orders.Table name: ordersNote: Table names are case sensitive.Input format :The input table is already created, and records are already prepopulated, as mentioned in the problem statement.Output format :The output displays the count of all the orders generated on '2012-08-17' as shown below.Count2

Single File Programming QuestionProblem StatementFrom the following table, write a query to count all the orders generated on "2012-08-17." Return the number of orders.Table name: ordersNote: Table names are case sensitive.Input format :The input table is already created, and records are already prepopulated, as mentioned in the problem statement.Output format :The output displays the count of all the orders generated on '2012-08-17' as shown below.Count2Refer to the sample output for the column header.Note :The program will be evaluated only after the “Submit Code” is clicked.Extra spaces and new line characters in the program output will result in the failure of the test case.

You have a quarterly sales data set that contains a date field, with each business day written as a value for orders placed on that day. You need to find the days on which sales did not occur, and you do not have every day of the time period in your data. What should you introduce into your model?Select an answer:Add a date table joined to the data set. The join should provide all dates in the time period and the associated records.Create calculations that look for dates that don't exist, and then provide the next date needed.Inform the leadership that this report is not possible.Open the data set and add records that represent the dates that are not present in the data set.

Create a table named orders with columns "order_id" (int), "customer_id" (int), "order_date" (date), "total_amount" (decimal), and "status" (varchar). The table should be configured with constraints such that "order_id" and "customer_id" cannot be empty, and "order_id" serves as the primary key.

1/1

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.