All pastes #385485 Raw Edit

Someone

public text v1 · immutable
·published 2007-03-07 21:50 UTC
rendered paste body
SELECT p.posts_id, p.posts_title, COUNT( ph.photos_id ) 
FROM posts AS p, photos AS ph
WHERE (
ph.photos_post_id = p.posts_id
)
GROUP BY ph.photos_post_id
ORDER BY p.posts_id DESC 
LIMIT 0 , 5