Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select * from (
- SELECT DISTINCT ON(article_id)*
- FROM articles_categories
- WHERE (article_id <> 88963
- AND
- category_id IN (4, 53630, 62355, 57177, 24, 53676, 69494, 69484, 69386, 11, 56820, 69617))
- ) as ca
- INNER JOIN articles ON ca.article_id = articles.id
- WHERE articles.article_type = 0
- AND
- articles.is_closed = false
- ORDER BY articles.publication_date DESC
- LIMIT 5;
Add Comment
Please, Sign In to add comment