DEBUG
294
WITH cteSection AS
(
/* OG
SELECT ROW_NUMBER() OVER (
PARTITION BY JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_activitycode')
Order BY JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_activitycode'),
JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_section')
) AS RowNum,
JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_activitycode') AS ActivityCode,
JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_section') AS SectionNum,
JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_brochurecode') AS BrochureCode,
JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_brochuretext') AS ActivityDescription,
JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_facilitylocation') AS LocationCode,
JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_displayonweb') AS Display
FROM AccuRecTrac
WHERE AccuRecTrac.TableName LIKE 'arsection'
-- [X] TODO - move to api filter
AND JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_archived') = 'false'
--AND JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_displayonweb') LIKE 'Yes'
*/
SELECT ROW_NUMBER() OVER (
PARTITION BY activitycode
Order BY activitycode,
section
) AS RowNum,
activitycode AS ActivityCode,
section AS SectionNum,
brochurecode AS BrochureCode,
brochuretext AS ActivityDescription,
facilitylocation AS LocationCode
FROM AccuRecTrac_arsection
),
cteSectionFilter AS
(
/* OG
SELECT DISTINCT JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_activitycode') AS ActivityCode
FROM AccuRecTrac
WHERE AccuRecTrac.TableName LIKE 'arsection'
-- [X] TODO - move to api filter
AND JSON_VALUE(AccuRecTrac.DataJSON, '$.arsection_displayonweb') LIKE 'Yes'
*/
SELECT DISTINCT activitycode AS ActivityCode
FROM AccuRecTrac_arsection
WHERE 1 = 1
),
cteBrochure AS
(
SELECT JSON_VALUE(AccuRecTrac.DataJSON, '$.sacommentcode_commentcode') AS BrochureCode,
JSON_VALUE(AccuRecTrac.DataJSON, '$.sacommentcode_comments') AS ActivityDescription
FROM AccuRecTrac
WHERE AccuRecTrac.TableName LIKE 'sacommentcode'
)
/* OG
SELECT DISTINCT JSON_VALUE(ART.DataJSON, '$.aractivity_activitycode') AS ActivityCode,
JSON_VALUE(ART.DataJSON, '$.aractivity_shortdescription') AS Title,
JSON_VALUE(ART.DataJSON, '$.aractivity_typecode') AS TypeCode,
CASE WHEN Brochure.ActivityDescription IS NOT NULL THEN Brochure.ActivityDescription ELSE SecDesc.ActivityDescription END AS ActivityDescription,
SecDesc.SectionNum as SectionNum,
SecDesc.RowNum
FROM AccuRecTrac AS ART
INNER JOIN cteSection AS SecDesc ON SecDesc.ActivityCode = JSON_VALUE(ART.DataJSON, '$.aractivity_activitycode')
LEFT JOIN cteBrochure AS Brochure ON Brochure.BrochureCode = SecDesc.BrochureCode
-- [] TODO - uncomment as the fallback skip activities with no sections returned will mess with pagination by possibly having less than rpp on a page
--INNER JOIN cteSectionFilter AS Filter ON Filter.ActivityCode = SecDesc.ActivityCode
WHERE ART.TableName LIKE 'aractivity'
-- [X] TODO - move to api filter
AND JSON_VALUE(ART.DataJSON, '$.aractivity_activitycode') <> ''
-- [X] TODO - move to api filter
AND SecDesc.ActivityDescription <> ''
AND RowNum = 1
-- [X] TODO - move to api filter
AND SecDesc.Display LIKE 'Yes'
*/
SELECT DISTINCT ART.activitycode AS ActivityCode,
ART.shortdescription AS Title,
ART.typecode AS TypeCode,
CASE WHEN Brochure.ActivityDescription IS NOT NULL THEN Brochure.ActivityDescription ELSE SecDesc.ActivityDescription END AS ActivityDescription,
SecDesc.SectionNum as SectionNum,
SecDesc.RowNum
FROM AccuRecTrac_aractivity AS ART
INNER JOIN cteSection AS SecDesc ON SecDesc.ActivityCode = ART.activitycode
LEFT JOIN cteBrochure AS Brochure ON Brochure.BrochureCode = SecDesc.BrochureCode
-- [] TODO - uncomment as the fallback skip activities with no sections returned will mess with pagination by possibly having less than rpp on a page
INNER JOIN cteSectionFilter AS Filter ON Filter.ActivityCode = SecDesc.ActivityCode
WHERE SecDesc.RowNum = 1
/* OG
ORDER BY JSON_VALUE(ART.DataJSON, '$.aractivity_typecode')
*/
ORDER BY ART.typecode
;
4230110 / Food Around the World
Food Around the World
Don’t miss this highly anticipated event where you can try a variety of foods representing various nationalities. Let your taste buds celebrate the diversity of the many cultures in the Chicagoland area. As you taste the delicious flavors, learn a little history about the impact these foods have on their culture. Following the tastes from around the world, enjoy musical entertainment to feed your soul. Bon appetit! Buon appetite! Enjoy your meal! Registration deadline: July 25. CAC
4230110-1 - Food Around the World
8/8/2024 - 8/8/2024
12:30 pm - 2:30 pm
Location
Centennial Activity Center
4230111 / Last Summer Hurray
Join us for a “last hurray” get-together to make the most of sunny days before fall starts to paint the trees. Jery Rite, who has performed nationally with acts such as Chubby Checker, Bo Didley, Three Dog Night and the Beach Boys, will delight you as his song list spans the decades including selections from the 50’s through the 90’s. Lunch on Angus Beef Hot Dogs, Pub Burgers, pasta salad, potato salad, potato chips and dessert. Registration deadline: August 19. Centennial Park Pavilion
4230111-1 - Last Summer Hurray
8/27/2024 - 8/27/2024
12:30 pm - 2:15 pm
4230111-2 - Last Summer Hurray - SHOW ONLY
8/27/2024 - 8/27/2024
1:15 pm - 2:15 pm
4230202 / STAR AARP Driver Safety Class
AARP Driver Safety
This eight-hour, two-day course is for motorists age 55 and older. It focuses on the physical changes that accompany aging and on ways older adult drivers can compensate for these changes to improve their driving skills. After taking this course you will be eligible for a multi-year discount on your car insurance! Fee is $20 for AARP members and $25 for non-AARP members. Make checks payable to AARP. Credit cards will not be accepted. Registration Required. Instructor: Phil Breneman. CAC
4230202-1 - STAR AARP Driver Safety Class
8/22/2024 - 8/23/2024
8:30 am - 12:30 pm
Location
Centennial Activity Center