I have this code which I adapted from Big table with rotated column labels using booktabs:
\usepackage{booktabs}
\begin{document}
\begin{table*}
\centering
\begin{tabular}{cccccccccc}
\toprule
& \multicolumn{2}{>{\begin{minipage}[c]{2cm}}l<{\end{minipage}}}{\centering Group 1\\ some subtitle}
& \multicolumn{4}{>{\begin{minipage}[c]{2cm}}l<{\end{minipage}}}{\centering Group 2\\ some subtitle}
& \multicolumn{3}{>{\begin{minipage}[c]{2cm}}l<{\end{minipage}}}{\centering Group 3\\ some subtitle} \\
\cmidrule(lr){2-3} \cmidrule(lr){4-7}\cmidrule(lr){8-10}
& \multicolumn{1}{>{\begin{turn}{90}\begin{minipage}[c][0.5cm][c]{2cm}}l<{\end{minipage}\end{turn}}}{some heading\\ blabla}
& \multicolumn{1}{>{\begin{turn}{90}\begin{minipage}[c][0.5cm][c]{2cm}}l<{\end{minipage}\end{turn}}}{not correctly\\ aligned with data}
& \multicolumn{1}{>{\begin{turn}{90}\begin{minipage}[c][0.5cm][c]{2cm}}l<{\end{minipage}\end{turn}}}{some heading \\ blabla}
& \multicolumn{1}{>{\begin{turn}{90}\begin{minipage}[c][0.5cm][c]{2cm}}l<{\end{minipage}\end{turn}}}{some heading}
& \multicolumn{1}{>{\begin{turn}{90}\begin{minipage}[c][0.5cm][c]{2cm}}l<{\end{minipage}\end{turn}}}{some heading}
& \multicolumn{1}{>{\begin{turn}{90}\begin{minipage}[c][0.5cm][c]{2cm}}l<{\end{minipage}\end{turn}}}{some heading\\ this one is long}
& \multicolumn{1}{>{\begin{turn}{90}\begin{minipage}[c][0.5cm][c]{2cm}}l<{\end{minipage}\end{turn}}}{some heading}
& \multicolumn{1}{>{\begin{turn}{90}\begin{minipage}[c][0.5cm][c]{2cm}}l<{\end{minipage}\end{turn}}}{some heading}
& \multicolumn{1}{>{\begin{turn}{90}\begin{minipage}[c][0.5cm][c]{2cm}}l<{\end{minipage}\end{turn}}}{some heading\\ this one is long}\\
\midrule
Sample1 & 122 & 109 & 0 & 0 & 55 & 48 & 63 & 61 & 1 \\
Sample2 & 122 & 109 & 0 & 0 & 55 & 48 & 63 & 61 & 1 \\
Sample3 & 122 & 109 & 0 & 0 & 55 & 48 & 63 & 61 & 1 \\
Sample4 & 122 & 109 & 0 & 0 & 55 & 48 & 63 & 61 & 1 \\
\midrule
Total & 122 & 109 & 0 & 0 & 55 & 48 & 63 & 61 & 1 \\
\bottomrule
\end{tabular}
\end{table*}
\end{document}
It generates this:
Here are a few things I'm not so sure how to do:
1) The "Group 2" and "Group 3" headings are not correctly centered. I would like each "Group x" heading to be centered whatever is the number of columns below that heading.
2) The second rotated sub-heading for Group 1 is not properly aligned with the data. I would like each rotated sub-heading to be aligned with the corresponding data.
3) Additionally, I would like to insert a (small) blank column between each group (for instance, between Group 1 and Group 2).