Query:


SELECT cust_no,    MIN(total_price), MAX(total_price), AVG(total_price),
SUM(total_price)  FROM cust_prod_t5   GROUP BY cust_no;

Output:

CUST_N MIN(TOTAL_PRICE) MAX(TOTAL_PRICE) AVG(TOTAL_PRICE) SUM(TOTAL_PRICE)
------ ---------------- ---------------- ---------------- ----------------
005               12000            12000            12000            12000
004               15000            15000            15000            15000
002                3000             3000             3000             3000
001                5000             5000             5000             5000
003                5000             5000             5000             5000

Leave a Reply

Subscribe to Posts | Subscribe to Comments

All Notes on BCA

All Notes  on BCA
BCA all subjects notes

Total Pageviews

Translate

Powered by Blogger.

Copyright © All Notes on BCA