SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag', 'post_format', 'bwg_tag') AND tr.object_id IN (918) ORDER BY t.name ASC
Szomszédok a Trafóban | Ars Omnis Kulturális Egyesület
Szomszédok a Trafóban
Legnagyobb örömünkre egy igen fantasztikus fejleményről adhatunk hírt a 2015-ös év végén:
A Trafó műsorára tűzte januárban Schermann Márta ötletéből és rendezésében készült SZOMSZÉDOK című darabot, amely az azonos címet viselő, az Ars Omnis Kulturális Egyesület esernyője alatt megvalósult projekt keretében született, és a Norvég Civil Támogatási Alap finanszírozásából jöhetett létre.
“2015. április 8-án volt a Szomszédok premierje. A nemzeti konzultáció a bevándorlásról és a határon felhúzott kerítés akkor még komikusan valószínűtlen rémképként lebegett előttünk. Azóta sok minden történt, de – vagy talán éppen ezért – az előadás mégis aktuálisabb, mint valaha.” – szerepel a honlapon.
felvételről:
és civilek
Rádiófelvétel: Surányi András, Drobek Attila
Zenei szerkesztő: Hortobágyi László
Videó: Tóth Artin
Technikai munkatárs. Éltető András
Kreatív munkatárs: Dávid Ferenc
Író: Hárs Anna
Rendezte: Schermann Márta
http://trafo.hu/hu-HU/szomszedok
Szerző: Nagy Réka Bejegyzés időpontja: 2015-12-12 | Kategória: Egyéb
← Résztvevőket keresünk a szicíliai „A.N.T.Y.G.O.N.E.” ifjúsági csereprogramra Hátrányos helyzetű fiatalokat keresünk a belga “Building A Team” ifjúsági csereprogramra →
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-07-16' AND a.event_end >= '2019-07-16' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-16') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-16') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-07-16')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-16') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-16') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-16'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-16') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-16') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-16'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-07-16' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-07-16' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-07-16') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-07-17' AND a.event_end >= '2019-07-17' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-17') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-17') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-07-17')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-17') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-17') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-17'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-17') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-17') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-17'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-07-17' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-07-17' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-07-17') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-07-18' AND a.event_end >= '2019-07-18' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-18') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-18') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-07-18')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-18') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-18') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-18'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-18') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-18') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-18'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-07-18' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-07-18' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-07-18') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-07-19' AND a.event_end >= '2019-07-19' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-19') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-19') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-07-19')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-19') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-19') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-19'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-19') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-19') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-19'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-07-19' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-07-19' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-07-19') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-07-20' AND a.event_end >= '2019-07-20' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-20') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-20') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-07-20')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-20') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-20') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-20'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-20') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-20') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-20'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-07-20' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-07-20' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-07-20') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-07-21' AND a.event_end >= '2019-07-21' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-21') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-21') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-07-21')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-21') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-21') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-21'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-21') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-21') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-21'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-07-21' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-07-21' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-07-21') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-07-22' AND a.event_end >= '2019-07-22' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-22') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-22') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-07-22')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-22') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-22') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-22'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-22') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-22') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-22'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-07-22' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-07-22' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-07-22') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-07-23' AND a.event_end >= '2019-07-23' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-23') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-23') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-07-23')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-23') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-23') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-23'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-23') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-23') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-23'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-07-23' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-07-23' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-07-23') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-07-24' AND a.event_end >= '2019-07-24' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-24') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-24') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-07-24')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-24') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-24') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-24'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-24') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-24') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-24'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-07-24' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-07-24' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-07-24') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-07-25' AND a.event_end >= '2019-07-25' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-25') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-25') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-07-25')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-25') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-25') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-25'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-25') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-25') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-25'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-07-25' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-07-25' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-07-25') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-07-26' AND a.event_end >= '2019-07-26' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-26') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-26') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-07-26')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-26') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-26') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-26'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-26') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-26') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-26'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-07-26' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-07-26' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-07-26') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-07-27' AND a.event_end >= '2019-07-27' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-27') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-27') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-07-27')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-27') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-27') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-27'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-27') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-27') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-27'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-07-27' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-07-27' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-07-27') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-07-28' AND a.event_end >= '2019-07-28' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-28') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-28') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-07-28')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-28') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-28') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-28'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-28') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-28') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-28'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-07-28' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-07-28' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-07-28') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-07-29' AND a.event_end >= '2019-07-29' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-29') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-29') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-07-29')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-29') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-29') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-29'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-29') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-29') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-29'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-07-29' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-07-29' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-07-29') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-07-30' AND a.event_end >= '2019-07-30' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-30') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-30') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-07-30')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-30') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-30') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-30'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-30') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-30') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-30'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-07-30' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-07-30' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-07-30') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-07-31' AND a.event_end >= '2019-07-31' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-31') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-07-31') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-07-31')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-31') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-07-31') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-31'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-31') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-07-31') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-07-31'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-07-31' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-07-31' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-07-31') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-08-01' AND a.event_end >= '2019-08-01' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-01') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-01') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-08-01')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-01') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-01') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-01'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-01') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-01') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-01'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-08-01' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-08-01' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-08-01') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-08-02' AND a.event_end >= '2019-08-02' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-02') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-02') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-08-02')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-02') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-02') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-02'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-02') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-02') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-02'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-08-02' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-08-02' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-08-02') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-08-03' AND a.event_end >= '2019-08-03' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-03') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-03') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-08-03')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-03') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-03') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-03'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-03') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-03') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-03'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-08-03' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-08-03' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-08-03') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-08-04' AND a.event_end >= '2019-08-04' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-04') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-04') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-08-04')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-04') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-04') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-04'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-04') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-04') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-04'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-08-04' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-08-04' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-08-04') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-08-05' AND a.event_end >= '2019-08-05' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-05') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-05') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-08-05')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-05') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-05') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-05'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-05') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-05') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-05'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-08-05' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-08-05' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-08-05') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-08-06' AND a.event_end >= '2019-08-06' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-06') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-06') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-08-06')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-06') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-06') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-06'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-06') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-06') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-06'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-08-06' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-08-06' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-08-06') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-08-07' AND a.event_end >= '2019-08-07' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-07') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-07') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-08-07')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-07') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-07') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-07'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-07') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-07') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-07'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-08-07' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-08-07' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-08-07') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-08-08' AND a.event_end >= '2019-08-08' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-08') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-08') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-08-08')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-08') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-08') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-08'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-08') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-08') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-08'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-08-08' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-08-08' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-08-08') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-08-09' AND a.event_end >= '2019-08-09' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-09') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-09') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-08-09')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-09') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-09') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-09'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-09') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-09') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-09'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-08-09' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-08-09' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-08-09') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-08-10' AND a.event_end >= '2019-08-10' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-10') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-10') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-08-10')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-10') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-10') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-10'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-10') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-10') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-10'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-08-10' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-08-10' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-08-10') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-08-11' AND a.event_end >= '2019-08-11' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-11') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-11') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-08-11')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-11') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-11') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-11'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-11') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-11') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-11'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-08-11' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-08-11' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-08-11') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-08-12' AND a.event_end >= '2019-08-12' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-12') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-12') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-08-12')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-12') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-12') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-12'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-12') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-12') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-12'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-08-12' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-08-12' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-08-12') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-08-13' AND a.event_end >= '2019-08-13' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-13') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-13') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-08-13')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-13') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-13') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-13'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-13') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-13') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-13'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-08-13' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-08-13' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-08-13') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-08-14' AND a.event_end >= '2019-08-14' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-14') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-14') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-08-14')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-14') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-14') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-14'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-14') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-14') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-14'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-08-14' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-08-14' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-08-14') - TO_DAYS(i.event_end)) ORDER BY event_id
SELECT a.*,'Normal' AS type FROM wp_calendar AS a WHERE a.event_begin <= '2019-08-15' AND a.event_end >= '2019-08-15' AND a.event_recur = 'S' UNION ALL SELECT b.*,'Yearly' AS type FROM wp_calendar AS b WHERE b.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-15') >= EXTRACT(YEAR FROM b.event_begin) AND b.event_repeats = 0 UNION ALL SELECT c.*,'Yearly' AS type FROM wp_calendar AS c WHERE c.event_recur = 'Y' AND EXTRACT(YEAR FROM '2019-08-15') >= EXTRACT(YEAR FROM c.event_begin) AND c.event_repeats != 0 AND (EXTRACT(YEAR FROM '2019-08-15')-EXTRACT(YEAR FROM c.event_begin)) <= c.event_repeats UNION ALL SELECT d.*,'Monthly' AS type FROM wp_calendar AS d WHERE d.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-15') >= EXTRACT(YEAR FROM d.event_begin) AND d.event_repeats = 0 UNION ALL SELECT e.*,'Monthly' AS type FROM wp_calendar AS e WHERE e.event_recur = 'M' AND EXTRACT(YEAR FROM '2019-08-15') >= EXTRACT(YEAR FROM e.event_begin) AND e.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-15'),EXTRACT(YEAR_MONTH FROM e.event_begin))) <= e.event_repeats UNION ALL SELECT f.*,'MonthSun' AS type FROM wp_calendar AS f WHERE f.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-15') >= EXTRACT(YEAR FROM f.event_begin) AND f.event_repeats = 0 UNION ALL SELECT g.*,'MonthSun' AS type FROM wp_calendar AS g WHERE g.event_recur = 'U' AND EXTRACT(YEAR FROM '2019-08-15') >= EXTRACT(YEAR FROM g.event_begin) AND g.event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '2019-08-15'),EXTRACT(YEAR_MONTH FROM g.event_begin))) <= g.event_repeats UNION ALL SELECT h.*,'Weekly' AS type FROM wp_calendar AS h WHERE h.event_recur = 'W' AND '2019-08-15' >= h.event_begin AND h.event_repeats = 0 UNION ALL SELECT i.*,'Weekly' AS type FROM wp_calendar AS i WHERE i.event_recur = 'W' AND '2019-08-15' >= i.event_begin AND i.event_repeats != 0 AND (i.event_repeats*7) >= (TO_DAYS('2019-08-15') - TO_DAYS(i.event_end)) ORDER BY event_id