USE tpch1; Select l_quantity, count(*) from lineitem where l_orderkey < 1000000 group by l_quantity order by l_quantity; l_quantity count(*) 1.00 19945 2.00 19804 3.00 19993 4.00 19815 5.00 19775 6.00 19743 7.00 19614 8.00 19883 9.00 20161 10.00 19980 11.00 19636 12.00 20041 13.00 20086 14.00 19800 15.00 20092 16.00 20169 17.00 20158 18.00 19830 19.00 20056 20.00 20013 21.00 20136 22.00 19961 23.00 20176 24.00 20224 25.00 20171 26.00 20117 27.00 20041 28.00 20193 29.00 19999 30.00 19821 31.00 19895 32.00 20042 33.00 19786 34.00 20124 35.00 20224 36.00 20274 37.00 19997 38.00 19982 39.00 19932 40.00 20000 41.00 20160 42.00 20198 43.00 19967 44.00 19940 45.00 20064 46.00 20082 47.00 20042 48.00 20076 49.00 19920 50.00 19910