目测一下,应该是oracle吧,如果sqlserver的话把substr换成substringselect substr(recipt,1,3),count(*) from purchase group by substr(recipt,1,3) having count(*)>10