Here is a duplicate of what you're after:

\documentclass{article}
\usepackage{multirow}% http://ctan.org/pkg/multirow
\begin{document}
\begin{tabular}{|c||l|l|l||l|l|l|}
\hline
\multirow{2}{*}{Title}
& \multicolumn{3}{c||}{Category~A}
& \multicolumn{3}{|c|}{Category~B} \\ \cline{2-7}
& Item~1 & Item~2 & Item~3 & Item~1 & Item~2 & Item~3 \\ \hline
$X$ & 1 & 2 & 3 & 1 & 2 & 3 \\ \hline
$Y$ & 1 & 2 & 3 & 1 & 2 & 3 \\ \hline
\end{tabular}
\end{document}
Here is a consideration:
The booktabs
package provides a really beautiful typesetting environment for tables, but enforces some strict rules to obtain them. One of these is to never, ever use vertical lines. The reason for this is that the columnar alignment of all the entries should visually provide some form of horizontal separation, therefore foregoing the need to add vertical lines (or making them somewhat superfluous). Your table, moulded into a booktabs
environment might look something like this:

\documentclass{article}
\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\usepackage{multirow}% http://ctan.org/pkg/multirow
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\begin{document}
\begin{tabular}{c@{\qquad}ccc@{\qquad}ccc}
\toprule
\multirow{2}{*}{\raisebox{-\heavyrulewidth}{Title}} & \multicolumn{3}{c}{Category~A} & \multicolumn{3}{c}{Category~B} \\
\cmidrule{2-7}
& Item~1 & Item~2 & Item~3 & Item~1 & Item~2 & Item~3 \\
\midrule
$X$ & 1 & 2 & 3 & 1 & 2 & 3 \\
$Y$ & 1 & 2 & 3 & 1 & 2 & 3 \\
\bottomrule
\end{tabular}
\end{document}
You'll notice the use of \toprule
, \midrule
(\cmidrule
) and \bottomrule
as complements to the traditional \hline
and \cline
commands.
I've modified the columns to be all centered c
for visual appeal. Additionally, separating the Category
headings I've inserted a \qquad
separation between the respective columns. Since booktabs
also add thicker-than-normal rules, graphicx
was required to drop Title
a little lower than what the regular multirow
package provides with \multirow{2}{*}{...}
. This drop was obtained using \raisebox{-\heavyrulewidth}{...}
. \heavyrulewidth
is a width (or length) definition from booktabs
.