zonate_toaster
asked on
Max,Min,Average,Standard Deviation,Median Sql Query Oracle
I have many columns in the table,want to select distinct combination of Col A and Col B and Col C and peform calculation in Col D for each distinct combination of Col A,Col B and Col C.and calculate in Col C(Max,Min,Average,Median and Standard Deviation) Values.Please let me know how to write a query for it.
Ex is attached.
Template.xls
Ex is attached.
Template.xls
ASKER
What you told me i did that:-
select distinct hostname,instance,order_ty pe,max(lat ency_micro _sec) as Max_Latency,min(latency_mi cro_sec) as Min_Latency,avg(latency_mi cro_sec) as Aver_Latency,
stddev(latency_micro_sec) as Stddev_Latency from latency_info order by hostname;
Please help me get the function for median also,and when i execute this command i get not a single-group group function.Please help me to write the query.
select distinct hostname,instance,order_ty
stddev(latency_micro_sec) as Stddev_Latency from latency_info order by hostname;
Please help me get the function for median also,and when i execute this command i get not a single-group group function.Please help me to write the query.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
TThank your for your prompt reply.
http://psoug.org/reference/analytic_functions.html
If you need help with any syntax given the data you provided, what are your expected results?