18. Display the clientno and total value for all orders
placed by that client. Output the result in the following
format: Client <clientno> has placed orders to the value of
<total value>

Answer Posted / guest

ANS:
select 'Client '||nvl(tochar(client_no,'unknown') ||' has
placed orders to the value of '|| nvl(sum(orders),0) as
order_summary
from order_table
group by client_no;

OUTPUT.....

ORDER_SUMMARY
-----------------------------------------------------
Client unknown has placed order to the value of 200
Client 1006 has placed order to the value of 4
Client 1008 has placed order to the value of 0
Client 1004 has placed order to the value of 54
Client 1005 has placed order to the value of 450

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does facebook use oracle?

571


How to write a query with a left outer join in oracle?

601


What is materialized view in Oracle?

630


What is an oracle cursor variable?

607


how to clone 9i Database on to 10g Database.

1822






Explain cascading triggers.

572


How to run queries on external tables?

564


What do you understand by a database object? Can you list a few of them?

602


What are privileges and grants?

568


Name the three major set of files on disk that compose a database in Oracle?

629


what is a Nested Loop join?

1562


What is oracle data type?

553


How do I uninstall oracle client from windows?

534


Explain the different normalization forms?

588


Difference between oracle's plus (+) notation and ansi join notation?

568