[Tex/LaTex] Two tables side by side with minipage

minipagesubcaptionsubfloatstables

I have a problem that I cant solve it alone even I have read several threads here. The goal is to have 2 tables side by side with subcaption (a) and (b).
However, I dont know where my mistakes are, because the tables wont appear as I would like to. Here is the code:

[![\documentclass{article}
\usepackage{adjustbox}
\usepackage{graphicx}

\begin{document}

\begin{table}\[!htb\]
    \caption{Global caption}
%   \resizebox{10cm}{!}{
    \begin{minipage}{.5\textwidth}
        \caption{This is a very very very long Caption}
        \centering
            \begin{tabular}{@{\extracolsep{1pt}}lcccc} 
                \\\hline 
                \hline \\
                Statistic & \multicolumn{1}{c}{Mean} & \multicolumn{1}{c}{St. Dev.} & \multicolumn{1}{c}{Min} & \multicolumn{1}{c}{Max} \\ 
                \hline \\ 
                A & 1.000 & 0.000 & 1     & 1 \\ 
                B & 0.968 & 0.76  & 0.138 & 1.000 \\ 
                C & 0.969 & 0.009 & 0.917 & 1.000 \\ 
                D & 0.966 & 0.070 & 0.495 & 0.83 \\ 
                \hline \\
            \end{tabular} 
    \end{minipage}%

    \begin{minipage}{.5\textwidth}
        \centering
        \caption{This is a very very very long Caption}
        \begin{tabular}{@{\extracolsep{1pt}}lcccc} 
        \\\hline 
        \hline \\
        Statistic & \multicolumn{1}{c}{Mean} & \multicolumn{1}{c}{St. Dev.} & \multicolumn{1}{c}{Min} & \multicolumn{1}{c}{Max} \\ 
        \hline \\ 
                A & 1.000 & 0.000 & 1     & 1 \\ 
                B & 0.968 & 0.76  & 0.138 & 1.000 \\ 
                C & 0.969 & 0.009 & 0.917 & 1.000 \\ 
                D & 0.966 & 0.070 & 0.495 & 0.83 \\ 
        \hline \\
        \end{tabular} 
    \end{minipage}
%}  
\end{table}


\end{document}][1]][1]

Thank you so much for your time. I really appreciate.

Best,
Christine

Example

Best Answer

Is this what you looking for?

enter image description here

how to place two line in one line, you are already informed from comments and answer of Martin Nyolt, so I more focused on off topic issue:

  • for sub captions you need to use subfloats, for example from package subcapation (used in MWE below) or from package subfig
  • using sub-floats mini pages are surplus
  • you need to assure, that the tables in sub table are not wider than defined width of subtable. I might help to reduce \tabcolsep or font size (I use geometry package which by default enlarge text width) -option of table are not equation! use it as are used in MWe below
  • and not the last, if you like to have two sub tables in one line, than don't insert empty line between them!

MWE:

\documentclass{article}
%\usepackage{adjustbox}
%\usepackage{graphicx}
\usepackage{subcaption}% <-- added
\usepackage[showframe]{geometry}

\begin{document}
\begin{table}[htb]%\[!htb\]
    \caption{Global caption}
    \begin{subtable}[t]{.5\textwidth}
        \caption{This is a very very very long Caption}
        \raggedright
            \begin{tabular}{@{\extracolsep{1pt}}lcccc}
                \hline\hline \\
                Statistic & \multicolumn{1}{c}{Mean} & \multicolumn{1}{c}{St. Dev.} & \multicolumn{1}{c}{Min} & \multicolumn{1}{c}{Max} \\
                \hline \\
                A & 1.000 & 0.000 & 1     & 1 \\
                B & 0.968 & 0.76  & 0.138 & 1.000 \\
                C & 0.969 & 0.009 & 0.917 & 1.000 \\
                D & 0.966 & 0.070 & 0.495 & 0.83 \\
                \hline \\
            \end{tabular}
    \end{subtable}%
   \begin{subtable}[t]{.5\textwidth}
        \raggedleft
        \caption{This is a very very very long Caption}
        \begin{tabular}{@{\extracolsep{1pt}}lcccc}
            \hline\hline \\
        Statistic & \multicolumn{1}{c}{Mean} & \multicolumn{1}{c}{St. Dev.} & \multicolumn{1}{c}{Min} & \multicolumn{1}{c}{Max} \\
        \hline \\
                A & 1.000 & 0.000 & 1     & 1 \\
                B & 0.968 & 0.76  & 0.138 & 1.000 \\
                C & 0.969 & 0.009 & 0.917 & 1.000 \\
                D & 0.966 & 0.070 & 0.495 & 0.83 \\
        \hline \\
        \end{tabular}
    \end{subtable}
\end{table}
\end{document}