Learned this the hard way. At the very end of the bedtools groupby help message, in the notes section, it says: "The input file/stream should be sorted/grouped by the -grp. columns". AUGH. Note that this is absolutely NOT a constraint posed by SQL's group by, even if their bold claim of 'Akin to the SQL "group by" command' may lead you believe otherwise. Talk about false advertising!