Lewusiek
Rozwiązane

Tabele sql, potrzebuje odpowiedzi na to co na zdjęciu ​



Tabele Sql Potrzebuje Odpowiedzi Na To Co Na Zdjęciu class=

Odpowiedź :

Odpowiedź:

select count(*) from tabela dania;

select sum(ilosc_zamowien) from dania;

select sum(ilosc_zamowien) from dania where typ = 2;

select avg(cena) from dania;

select avg(ilosc_zamowien) from dania where typ = 3;

select avg(ROUND(cena,2)) as "Średnia cena dania typu 3" from dania where typ = 3;

select max(ilosc_zamowien) from dania where typ = 1;

select min(cena) from dania where typ = 2 or typ = 3;

select count (*) from dania where nazwa like "%sok%";

select sum(ilosc_zamowien) from dania where nazwa like "%sok%";

Wyjaśnienie:

Ponazywałem kolumny oraz tabelę po swojemu.