SELECT photos.id AS photos_id, photos.title AS photos_title, photos.meta_title AS photos_meta_title, photos.description AS photos_description, photos.page_url AS photos_page_url, photos.album_cover AS photos_album_cover, photos.document_id AS photos_document_id, photos.album_id AS photos_album_id, photos.keywords AS photos_keywords, photos."order" AS photos_order, photos.is_published AS photos_is_published, photos.is_active AS photos_is_active, photos.created_by AS photos_created_by, photos.created AS photos_created, photos.last_updated AS photos_last_updated, photos.published_on AS photos_published_on
FROM photos
WHERE photos.is_active = true ORDER BY photos.published_on DESC