Graph and Histograms

Today we use the database to perform the analysis of data and then continuously perform aggregate queries and then export to spreadsheets for pivot tables and histograms, you implement a feature like that even starting with basic functions, or perhaps using R for rendering graphs in order to have regression lines or calculation of quartiles and percentiles?
Thank you very much
Thank you very much