title: How do I join multible tables?
body: <p>I have the following tables (and example values):</p>
  
  <pre><code>**user:**
  user_id (1, 2, 3)
  username (john33, reddiamond...)
  password (pass1, pass2...)
  
  **session:**
  session_id (4,5, 6)
  user_id (1, 2, 3)
  
  **activity**
  activity_id (1, 2)
  name (running, walking...)
  
  **user_activity**
  user_activity_id (1, 2, 3, 4, 5)
  session_id (4, 5)
  activity_id (1, 2)
  </code></pre>
  
  <p>All columns with the same name are related. In the table <code>user_activity</code> there are rows which describe what is the session's activity and the activity refers to users.</p>
  
  <p>However I would like to get the table which describes what the user is currently doing:</p>
  
  <pre><code>**result**
  username(john33)
  activity.name(walking)
  </code></pre>
  
  <p>What is the SQL statement that gets the result table?</p>
  
  <p>(I'm using MSSQL).</p>