select * from (
        select cv.lasttime,cm.mailbox,cv.clientip from `co_user_visitlog` as cv INNER JOIN `core_mailbox` as cm where cv.mailbox_id = cm.mailbox_id and cm.mailbox in 
       (
'pyj@test.com','cs@test.com','cs2@test.com','cs1@test.com' )order by cv.lasttime desc     ) as t group by t.mailbox;

 

在一条语句里面不可以先order by 再进行group by

 

最终套了一个查询,然后再group by 出来

相关文章:

  • 2022-01-23
  • 2022-12-23
  • 2022-01-01
  • 2021-06-24
  • 2022-02-03
  • 2022-12-23
  • 2022-01-05
  • 2022-01-01
猜你喜欢
  • 2021-12-13
  • 2021-04-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案