i need to create a view that display last post for each user to make them into carousel, i do many search but no pure response. than i will try to generate my view from this sql query:

FROM `node`
WHERE `type` = 'post'
AND `nid`
IN (
SELECT MAX( `nid` )
FROM `node`
WHERE `type` = 'post'
GROUP BY `uid`
LIMIT 0 , 30

Any Idea?

1 Answer 1


It looks like you're selecting 30 nodes of type 'post' and grouping them by user. This view would be pretty easily built using the views UI. Once you've created the view, you should be able to add an author uid as a grouping field. This will group the post fields by author.

Let me know if you have questions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.