SELECT d.* FROM Document d JOIN DocumentRevision r ON r.id = (SELECT MAX(id) FROM DocumentRevision WHERE documentId = d.id) JOIN RevisionStatus s ON s.id = (SELECT MAX(id) FROM RevisionStatus WHERE revisionId = r.id) AND s.status = 1
server {
listen 80;
server_name example.com www.example.com;
rewrite ^(.*) https://example.com$1 permanent;
}
SELECT DISTINCT name FROM dates
SELECT MAX(date), name FROM dates GROUP BY name
-resize '1280x1280>'