Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
col1 col2 col3
3 4 5
5 5 6
i want average of each column to be displayed in a bargraph
Posted

1 solution

You can't, not really - SQL is a data storage and retrieval system, and graphing is a presentation layer function. SQL can't talk directly to your users, and has no idea what kind of system the user is using: it could be web based via a browser, or direct via a command line application, or Winforms, or WPF, or ... SQL doesn't know, so it can't provide appropriate graphics.

Do this in your presentation software - it's relatively easy in most of them!
 
Share this answer
 
Comments
Member 8499677 24-Nov-15 0:10am    
thank you for your answer. But actually i want to find average of values in each column and then i want to store average values in rows. how to do it?
something like
col1 col2 col3
3 4 5
5 5 6

average of col1 is 4
average of col2 is 4.5
average of col3 is 5.5

now i want the average values to be stored in rows
avg1 4
avg2 4.5
avg3 5.5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900