title: Get last data of last transaction date
body: <p>I have a table for transactions that need to display the last transaction data row. 
  Here is the table:</p>
  
  <pre><code>Table Name : Product_detail_trx
  
  Trans_date;  Prod_Code;  Outlet_code;   Qty;   Prev_bal_qty;
  2020-02-26;  SKU1;       CNGI;          2;       1;
  2020-02-20;  SKU1;       CNGI;         -3;       4;
  2020-02-29;  SKU1;       CNGI;          5;       3;
  </code></pre>
  
  <p>I want to get the last trans_date with sum of qty and its <code>prev_bal_qty</code>. </p>
  
  <p>The data must be shown like this:</p>
  
  <pre><code>Trans_date Outlet_Code Qty_Total  Prev_bal_qty
  2020-02-29; CNGI;        4;          3;
  </code></pre>
  
  <p>I tried to</p>
  
  <pre><code>select Max trans_date, sum (qty) as total_qty, prev_bal_qty
  group by prod_code, outlet_code, prev_bal_qty
  </code></pre>
  
  <p>But it showed not in group.</p>