but i don't know how to write it on ActiveRecord,
I try mony method, but i can't get the results. i am also post a thread to forum of caslte, but no one replay it ,may be it is so easy.
so , i redo my work. i found ,
i can use
How to get the data? like below
and I found in activeRecord you can use SQL language to query, just set QueryLanguage to sql,
anthor method: Navtie Query