Simple histograms and SQL commands of data