string(2420) "SELECT DISTINCT
ranked_results.ID,
ranked_results.meta_key,
ranked_results.post_date,
ranked_results.meta_value,
ranked_results.title,
ranked_results.stock,
ranked_results.group_id
FROM (
SELECT
wp_30a7d99a36_posts.ID,
author_id.meta_key,
wp_30a7d99a36_posts.post_date,
book_year.meta_value,
books.title,
books.stock,
books.group_id,
ROW_NUMBER() OVER (
PARTITION BY books.group_id
ORDER BY
CASE WHEN books.stock > 0 THEN 0 ELSE 1 END,
wp_30a7d99a36_posts.post_date DESC
) as rn
FROM wp_30a7d99a36_posts
INNER JOIN books ON wp_30a7d99a36_posts.ID = books.id
LEFT JOIN wp_30a7d99a36_postmeta author_id
ON (author_id.post_id = wp_30a7d99a36_posts.ID AND author_id.meta_key LIKE 'acf_book_creators_%_acf_book_creator_id')
LEFT JOIN wp_30a7d99a36_postmeta book_group_id
ON (book_group_id.post_id = wp_30a7d99a36_posts.ID AND book_group_id.meta_key = 'acf_book_argo_group_id')
LEFT JOIN wp_30a7d99a36_postmeta author_role
ON (author_role.post_id = wp_30a7d99a36_posts.ID AND author_role.meta_key LIKE REPLACE(author_id.meta_key, 'id', 'role'))
LEFT JOIN wp_30a7d99a36_postmeta book_id
ON (book_id.post_id = wp_30a7d99a36_posts.ID AND book_id.meta_key = 'acf_book_argo_id')
LEFT JOIN wp_30a7d99a36_postmeta book_year
ON (book_year.post_id = wp_30a7d99a36_posts.ID AND book_year.meta_key = 'acf_book_year')
LEFT JOIN wp_30a7d99a36_term_relationships determination
ON (determination.object_id = wp_30a7d99a36_posts.ID AND determination.term_taxonomy_id = 48)
LEFT JOIN wp_30a7d99a36_postmeta thumbnail_id
ON (thumbnail_id.post_id = wp_30a7d99a36_posts.ID AND thumbnail_id.meta_key = '_thumbnail_id')
WHERE
wp_30a7d99a36_posts.post_type = 'book'
AND wp_30a7d99a36_posts.post_status IN ('publish', 'future')
AND author_id.meta_value = 985
AND author_role.meta_value IN ('Autor', 'Ilustrace', 'Překlad')
AND books.binding <> ''
AND book_id.meta_value IN (2384,101762,127608,141010,165241,169909,172767,194766,199538,218561,218561,219602,277202,289146,297283,297283,500213,501792,502629,506056,506765,513331,513718,513813,517562,526089,529781)
) ranked_results
WHERE ranked_results.rn = 1
ORDER BY ranked_results.post_date DESC"
Karel Cudlín (1960) je renomovaný český fotograf, věnuje se převážně dokumentární fotografii. Spolupracuje s vydavatelstvími, televizemi a filmovými produkcemi v České republice i v zahraničí a působí jako pedagog. Je členem spolku dokumentárních fotografů 400 ASA. V letech 1997–2003 byl jedním z oficiálních fotografů prezidenta Václava Havla.
Je držitelem celkem šestnácti cen ze soutěže Czech Press Photo, obdržel též Cenu Revolver Revue (2008). V roce 2016 se habilitoval na FAMU jako docent.