Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / girija.112

i forgot to login thats why i have posted it once again

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 ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an oracle transaction?

1146


How to test null values?

1107


What is meant by a deadlock situation?

1109


Is primary key indexed by default in oracle?

987


How to get last row id?

994


Can sub procedure/function be called recursively?

1004


What is an oracle tablespace?

1045


Where are the settings stored for each instance in oracle?

1105


How to select some columns from a table in oracle?

1095


How to invoke the data pump export utility?

1187


I have a database backup file in .db (ext) form how to conver it into .dmp (ext.) for oracle database

2138


Is the After report trigger fired if the report execution fails ?

2915


How to add a new column to an existing table with a default value?

1016


What is the difference between PFILE and SPFILE in Oracle?

1061


How to revoke create session privilege from a user in oracle?

1018