--interpreti obsahujici nekde ve jmene RED
select interpret, pisen, poznamka from cd where UPPER(interpret) like '%RED%';

--ukazka in
select interpret, pisen from cd where interpret not in ('U2', 'The Beatles');

--ukazka count, group by a having
select interpret, count(pisen) as pocet_pisni from cd group by interpret having count(pisen) >= 5;


select interpret, count(pisen) as pocet_pisni from cd 
where interpret not in('U2') group by interpret having count(pisen) >= 5
order by interpret desc;

--vnoreny select
select interpret, pisen, concat(concat(d_min,':'),d_sec) as delka from cd where d_min*60+d_sec = (select max(d_min*60+d_sec) from cd);

select pisen, titul, interpret, concat(concat(d_min,':'),d_sec) as delka from pisne left join tituly on pisne.stopa=tituly.id;


