SELECT SQL_CALC_FOUND_ROWS wp_posts.*, (
SELECT SUM(rooms_available) rooms_available FROM (SELECT IFNULL(SUM(room_count), 0) rooms_available, availabilities.accommodation_id FROM wp_byt_accommodation_vacancies availabilities INNER JOIN (
select d.the_date from
(
select adddate('2024-12-04',t4.i*10000 + t3.i*1000 + t2.i*100 + t1.i*10 + t0.i) the_date from
(select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t0,
(select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t1,
(select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t2,
(select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t3,
(select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t4
having the_date between '2024-12-04' and '2026-12-04'
ORDER BY the_date
) d
where DATE(d.the_date) >= DATE(CURDATE())
group by d.the_date
order by d.the_date
) possible_dates ON (possible_dates.the_date >= DATE(availabilities.start_date) AND possible_dates.the_date < DATE(availabilities.end_date)) WHERE 1=1 AND ('2024-12-04' BETWEEN start_date AND end_date OR start_date <= '2026-12-04') AND end_date >= '2024-12-04' GROUP BY possible_dates.the_date, availabilities.accommodation_id ) as ra WHERE accommodation_id = wp_posts.ID ) rooms_available , (
SELECT IFNULL(SUM(rooms_booked), 0) rooms_booked FROM ((SELECT IFNULL(SUM(bookings.room_count), 0) rooms_booked, bookings.accommodation_id, possible_dates.the_date FROM wp_byt_accommodation_bookings bookings INNER JOIN (
select d.the_date from
(
select adddate('2024-12-04',t4.i*10000 + t3.i*1000 + t2.i*100 + t1.i*10 + t0.i) the_date from
(select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t0,
(select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t1,
(select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t2,
(select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t3,
(select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t4
having the_date between '2024-12-04' and '2026-12-04'
ORDER BY the_date
) d
where DATE(d.the_date) >= DATE(CURDATE())
group by d.the_date
order by d.the_date
) possible_dates ON (possible_dates.the_date >= DATE(bookings.date_from) AND possible_dates.the_date < DATE(bookings.date_to)) AND IFNULL(woo_status, '') IN ('processing') WHERE 1=1 GROUP BY possible_dates.the_date, accommodation_id ) as rb, (SELECT MIN(start_date) min_start_date, MAX(end_date) max_end_date, accommodation_id FROM wp_byt_accommodation_vacancies GROUP BY accommodation_id) min_max_available_dates ) WHERE rb.accommodation_id = wp_posts.ID AND min_max_available_dates.accommodation_id = wp_posts.ID AND rb.the_date >= min_max_available_dates.min_start_date AND rb.the_date < min_max_available_dates.max_end_date ) rooms_booked , IFNULL((SELECT price_meta2.meta_value + 0 FROM wp_postmeta price_meta2 WHERE price_meta2.post_id=wp_posts.ID AND price_meta2.meta_key='_accommodation_min_price:2024-12-04:2026-12-04' LIMIT 1), 0) accommodation_price , IFNULL((SELECT price_meta3.meta_value + 0 FROM wp_postmeta price_meta3 WHERE price_meta3.post_id=wp_posts.ID AND price_meta3.meta_key='accommodation_static_from_price' LIMIT 1), 0) accommodation_static_price
FROM wp_posts
WHERE 1=1 AND wp_posts.post_type = 'accommodation' AND ((wp_posts.post_status = 'publish'))
GROUP BY wp_posts.ID HAVING 1=1 AND rooms_available > rooms_booked AND rooms_available >= 1
ORDER BY accommodation_price DESC
LIMIT 0, 12
Griekenland, de Peloponnesos en Athene; schitterende kustlijnen, prachtige, ruige, ongerepte natuur en culturele historische steden zoals Delphi, Nafplion, Monemvasia en nog veel meer..
Zweden en Noorwegen; Schitterende kustlijnen, prachtige, ruige, ongerepte natuur en authentieke steden zoals Geilo, Stockholm, Bergen en nog veel meer..
Deze 13 daagse bijzondere Fly-drive naar één van de mooiste, nog bijna onontdekte bestemmingen ter wereld. De puurheid van Albanië (en Ohrid in Macedonië en Noord Griekenland) zullen je aangenaam verrassen. Ontdek het nu!
Ontdek Lapland (je bezoekt 3 landen!) met hoogtepunten als Rovaniemi, Kiruna, Tromso en Kittilä en nog veel meer! Pas zelf je reis aan, helemaal op maat.
Zie in 5 of 8 dagen één van de mooiste bestemmingen ter wereld. Een Noorderlicht ontdekkingstocht met Noorwegen, Zweden en Finland, laat je inspireren!
Toe aan een heerlijke rondreisvakantie door het een van de mooiste landschappen van Italië? Met deze bijzondere Fly-drive krijg je een ander Sicilië te zien.
We gebruiken cookies om ervoor te zorgen dat onze site zo soepel mogelijk draait. Als je doorgaat met het gebruiken van deze site, gaan we ervan uit dat je ermee instemt.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie
Duur
Beschrijving
cookielawinfo-checkbox-analytics
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy
11 months
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.