title: Getting max values for columns and join them with another table
body: <p>I am new in SQL queries. I am planning to join 2 tables in HANA Express and get max value of two columns of one table and join it with another table. Here is scenario:</p>
  
  <pre><code>Table A
  +-----+----------------+
  | Key |     Value      |
  +-----+----------------+
  |   1 | Value is 1     |
  |   2 | Value is 2     |
  |   3 | Value is 3     |
  +-----+----------------+
  
  Table B
  +-----+----------------------------+------+
  | Seq |         Timestamp          | Key  |
  +-----+----------------------------+------+
  | 500 | Feb 3, 2017 6:35:59.742 PM |    1 |
  | 501 | Feb 3, 2017 6:35:59.742 PM |    2 |
  | 502 | Feb 3, 2017 6:36:05.758 PM |    2 |
  | 503 | Feb 3, 2017 6:36:05.758 PM |    4 |
  | 504 | Feb 3, 2017 6:36:05.758 PM |    3 |
  | 505 | Feb 3, 2017 6:36:09.766 PM |    5 |
  +-----+----------------------------+------+
  
  output table
  +-----+------------+--------+----------------------------+--------------------------------+
  | Key |   Value    | MaxSeq |      LatestTimeStamp       |          ExecutionTime          |
  +-----+------------+--------+----------------------------+--------------------------------+
  |   1 | Value is 1 |    505 | Feb 3, 2017 6:36:09.766 PM | (execution time of this query) |
  |   2 | Value is 2 |    505 | Feb 3, 2017 6:36:09.766 PM | (execution time of this query) |
  |   3 | Value is 3 |    505 | Feb 3, 2017 6:36:09.766 PM | (execution time of this query) |
  +-----+------------+--------+----------------------------+--------------------------------+
  </code></pre>
  
  <p>So here the MaxSeq would be max value of Seq column in table B and LatestTimeStamp is the latest timestamp of the timestamp column of table B and both of them would be constant in the joined table. The execution time calculated from <code>Current_Timestamp</code> function in HANA. is it even possible? </p>