How to use group by and breakdown the information into the categories.

Can you supply some sample data?

See FAQ: How to do a minimal reproducible example ( reprex ) for beginners or a handy way to supply sample data is to use the dput() function. See ?dput. If you have a very large data set then something like head(dput(myfile), 100) will likely supply enough data for us to work with.