DEBUG
2
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 'Karate')
),
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 'Martial Arts' */ ART.typecode LIKE 'Martial Arts')
/* OG
ORDER BY JSON_VALUE(ART.DataJSON, '$.aractivity_typecode')
*/
ORDER BY ART.typecode
;
4042201 / Pre Karate
In our Pre-Karate Safety classes, young children develop flexibility, strength, and coordination in fun, yet disciplined activities. This program is specifically designed for growing minds and bodies to enhance memory and agility. Watch your child's confidence blossom and their skills improve.
4042201-1 - Pre Karate (Beginner/Continuer)
Res/NonRes
$184.00/$280.00
6/12/2024 - 8/28/2024
4:00 pm - 4:45 pm
4042201-2 - Pre Karate (Intermediate-Advanced)
Res/NonRes
$184.00/$280.00
6/12/2024 - 8/28/2024
4:50 pm - 5:35 pm
4042201-3 - Pre Karate (No Experience)
Res/NonRes
$184.00/$280.00
6/15/2024 - 8/24/2024
9:10 am - 9:55 am
4042201-4 - Pre Karate (Continuer 1 prior session)
Res/NonRes
$184.00/$280.00
6/15/2024 - 8/24/2024
10:00 am - 10:45 am
4042202 / Youth/Adult Karate
Youth Karate
ISKC's karate classes offer a good mix of strength training, with cardiovascular and flexibility exercises included. Students increase their coordination, agility, and poise, as well as learn lasting personal safety skills. They also benefit from the mental stimulation of learning the choreographed moves of the kata and the discipline of conforming to the class rules. Fees are per person.
4042202-1 - Youth/Adult Karate (White-Red)
Res/NonRes
$184.00/$280.00
6/12/2024 - 8/28/2024
5:40 pm - 6:40 pm
4042202-2 - Youth/Adult Karate (Orange-Blue)
Res/NonRes
$184.00/$280.00
6/12/2024 - 8/28/2024
6:45 pm - 7:45 pm
4042202-3 - Youth/Adult Karate (Brown-Black)
Res/NonRes
$232.00/$352.00
6/12/2024 - 8/28/2024
7:50 pm - 9:15 pm
4042202-4 - Youth/Adult Karate (Green & Up)
Res/NonRes
$184.00/$280.00
6/12/2024 - 8/28/2024
7:50 pm - 8:50 pm
4042202-5 - Youth/Adult Karate (White-Red)
Res/NonRes
$184.00/$280.00
6/15/2024 - 8/24/2024
10:45 am - 11:45 am
4042202-6 - Youth/Adult Karate (Orange-Yellow)
Res/NonRes
$184.00/$280.00
6/15/2024 - 8/24/2024
11:50 am - 12:50 pm
4042202-7 - Youth/Adult Karate (Blue-Green)
Res/NonRes
$184.00/$280.00
6/15/2024 - 8/24/2024
1:00 pm - 2:00 pm
4042202-8 - Youth/Adult Karate (Purple-3rd Brown)
Res/NonRes
$184.00/$280.00
6/15/2024 - 8/24/2024
2:00 pm - 3:00 pm
4042202-9 - Youth/Adult Karate (2nd Brown-Black)
Res/NonRes
$184.00/$280.00
6/15/2024 - 8/24/2024
3:00 pm - 4:00 pm