Forum Discussion

mahesh_revanwar's avatar
10 years ago

Get user details using v2 call order by last visit time

Hi All,

 

I want users sorted by there last activity.

 

I have tried V2 call :

 

SELECT * FROM users WHERE roles.name="Administrator"

 

It have a last_visit_time as one parameter. Can we use this for getting result of users order by this parameter?

 

I have tried bellow call but it gives error.

SELECT * FROM users WHERE roles.name="Administrator" ORDER BY last_visit_time'

 

Please help me if you know any better approach or any thing that sorts users by last_visit_time.

 

Regards,

Mahesh Revanwar

2 Replies

  • OlivierS's avatar
    OlivierS
    Lithium Alumni (Retired)
    10 years ago

    mahesh_revanwar it looks like it's not possible to use that field with the ORDER BY clause

     

    Field 'last_visit_time' does not exist for object 'users' as a sort constraint.
  • SylvainK's avatar
    SylvainK
    Contributor
    8 years ago

    Hello,

     

    Got the same problem.

    Any guess how to solve it ?

     

    Didn't find in the docs :/

     

    Regards.