IZ
where IF(@var="ALL", id, id = @var);
Size: a a a
IZ
where IF(@var="ALL", id, id = @var);
IZ
IZ
IZ
S
select
col1,
col2,
col3,
col4
from (
select
group,
year,
month,
col1,
col2,
col3,
concat(...) as col4
from table
WHERE IF(@group="ALL", 1, group = @group) AND IF(@year="ALL", 1, year = @year) AND IF(@month="ALL", 1, month = @month)
UNION ALL
SELECT ...
UNION ALL
SELECT ...
UNION ALL
SELECT ...
) t
ORDER BY t.year, t.month, t.group DESC
IZ
IZ
DE