问题
Do you know if it's possible to make a simple histogram representing the frequency of all my values divided by ranges (0-5;5-10;10-15;15-20 ...) ?
Exemple:
回答1:
The easiest way would be to format your data into "bins." You could do something like this:
count(CASE WHEN Age > 0 AND Age <= 5 Then 1) AS bin1
count(CASE WHEN Age > 5 AND Age <= 10 Then 1) AS bin2
count(CASE WHEN Age > 10 AND Age <= 15 Then 1) AS bin3
count(CASE WHEN Age > 15 AND Age <= 20 Then 1) AS bin4
This is the easiest way to get your data into a histogram-type format, and then select one of the bar charts available in GDS.
来源:https://stackoverflow.com/questions/46725054/how-to-make-a-simple-histogram-representing-a-distribution-in-google-data-stud