title: How to translate this sql to left join without subquery？
body: <p>I want to create a view in mysql.But that in mysql does't support subquery.
  How to write the sql without subquery?       </p>
  
  <pre><code>select * from dev_location t1
  
          inner join 
  
      (
          select
              `dev_location`.`device_id` AS `device_id`,
              max(`dev_location`.`id`) AS `id`
          from
              `dev_location`
          group by `dev_location`.`device_id`) t2
  
      on t1.id = t2.id
  </code></pre>