SELECT "o"."id" AS "last_shown_update_id", "o"."siteid" AS "site_id", "o"."image_id", "o"."name" AS "o_name", "o"."name_en" AS "o_name_en", "o"."id" AS "o_id", "o"."allow_artcard" AS "o_allow_artcard", "o"."stock", "o"."price", "o"."discipline_attribute_id" AS "discipline_id", "o"."width_orig" AS "o_width_orig", "o"."height_orig" AS "o_height_orig", "s"."alias" AS "s_alias", "s"."name" AS "s_name", "s"."domain_full", "s"."allow_artcards" AS "s_allow_artcards", "s"."has_webshop" AS "s_has_webshop" FROM "object" AS "o" INNER JOIN "site" AS "s" ON s.id = o.siteid WHERE (1=1 AND s.status > 1 AND s.sitehelp_approved = 1 AND s.rating > 0 AND s.active = true AND o.is_deleted = false AND o.sitehelp_approved = 1 AND o.available_for_homepage = true AND s.site_type = 1 AND 1=1 AND stock > 0 AND (not (s.webshop_closed_from < now() and s.webshop_closed_until > now()) or s.webshop_closed_from is null) AND s.has_webshop = 1 AND price < 5000 AND price > 0 ) ORDER BY "o"."last_shown_on_exto" ASC LIMIT 40 OFFSET 320