DEBUG
1
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
AND (subtype LIKE 'Theater Camp')
),
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
AND (/* OG JSON_VALUE(ART.DataJSON, '$.aractivity_typecode') LIKE 'Theater' */ ART.typecode LIKE 'Theater'/* OG OR JSON_VALUE(ART.DataJSON, '$.aractivity_typecode') LIKE 'Camps' */ OR ART.typecode LIKE 'Camps')
/* OG
ORDER BY JSON_VALUE(ART.DataJSON, '$.aractivity_typecode')
*/
ORDER BY ART.typecode
;
3180101 / Theater Camp
Campers spend the week learning drama, singing, dance, and rehearsing a musical that will be presented to family and friends on Saturday. Our productions offer fun and challenging roles for performers of all levels of experience. No auditions are required and students will be placed in a role that will allow them to shine. Students are welcome to enroll for multiple weeks! Before and after care options available.
3180101-3 - Theater Camp - Flakes! A Blizzard of Fun (Ages 4-6)
Res/NonRes
$285.00/$285.00
7/8/2024 - 7/13/2024
8:30 am - 11:30 am
3180101-4 - Theater Camp - Oceans Of Fun (Ages 4-6)
Res/NonRes
$285.00/$285.00
7/15/2024 - 7/20/2024
8:30 am - 11:30 am
3180101-5 - Theater Camp - Pete the Cat Takes the Stage! (Ages 4-6)
Res/NonRes
$285.00/$285.00
7/22/2024 - 7/27/2024
8:30 am - 11:30 am
3180101-6 - Theater Camp - Where the Wild Things Are (Ages 4-6)
Res/NonRes
$285.00/$285.00
7/29/2024 - 8/3/2024
8:30 am - 11:30 am
3180101-9 - Theater Camp - Disney’s Frozen Jr. (Ages 6-1 6)
Res/NonRes
$395.00/$395.00
7/8/2024 - 7/13/2024
9:00 am - 3:00 pm
3180101-10 - Theater Camp - Disney’s Finding Nemo Jr. (Ages 6-16)
Res/NonRes
$395.00/$395.00
7/15/2024 - 7/20/2024
9:00 am - 3:00 pm
3180101-11 - Theater Camp - Shrek The Musical Jr. (Ages 6-16)
Res/NonRes
$395.00/$395.00
7/22/2024 - 7/27/2024
9:00 am - 3:00 pm
3180101-12 - Theater Camp - Disney’s Peter Pan Jr. (Ages 6-16)
Res/NonRes
$395.00/$395.00
7/29/2024 - 8/3/2024
9:00 am - 3:00 pm
3180101-19 - Theater Camp - Disney’s Frozen Jr. (Ages 6-1 6)
Res/NonRes
$395.00/$395.00
7/8/2024 - 7/13/2024
9:00 am - 3:00 pm
Location
St. Lukes Lutheran Church
3180101-22 - Theater Camp - Disney’s Peter Pan Jr. (Ages 6-16)
Res/NonRes
$395.00/$395.00
7/29/2024 - 8/3/2024
9:00 am - 3:00 pm
Location
St. Lukes Lutheran Church
3180101-33 - Theater Camp - Shrek The Musical Jr. (Ages 6-16)
Res/NonRes
$395.00/$395.00
7/22/2024 - 7/27/2024
9:00 am - 3:00 pm
Location
St. Lukes Lutheran Church