Page 1 of 1

Getting Data each row from query?

Posted: Thu Aug 08, 2019 10:35 am
by katiequinn
guys,

I have a sample file I attached along with this post. I want to get the data of each row of my query and display it one at a time in the dialogbox or answer here in livecode I think I almost there but not quiet..

Need your help guys..

Thank you

Re: Getting Data each row from query?

Posted: Tue Aug 13, 2019 8:58 am
by vijaydeveloper
The very simplest answer to your question is here:

Code: Select all

select * from (
    select
        username,
        date,
        value,
        row_number() over(partition by username order by date desc) as rn
    from
        yourtable
) t
where rn = 1
For more learning and thoughts just comment in this answer.