Members of multiple Groups in query

Re: Re: Re: Re: Members of multiple Groups in query

by Daniel Becerra -
Number of replies: 0
Hi, I receive the following error:

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PIVOT (
    COUNT(cohort)
    FOR cohort IN (
        [your_cohort_1],
     ' at line 10
(Line 10 being PIVOT  and that's why I wonder about syntax)

However at this moment what I require is to display cohorts that contain the word "jornada" in a single column; then another column for all that start with "grado"... In order to have fewer columns.

studentname        your_cohort_1    your_cohort_2    your_cohort_3
-------------------------------------------------------------------
A`aishah Boo       Jornada1          Grado1101 Once
Abraham Grey     Jornada2          Grado1102 Once
Abel Drey          Jornada2          Grado1103 Once
Jon Els            Jornada1          Grado1104 Once
Wynand Smit        Jornada3          Grado1105 Once