Kurgitabeli käsklused INSERT INTO `if16_jaagup_1`.`kurgid` (`id`, `pikkus`, `diameeter`, `mass`) VALUES (NULL, '33', '7', '180'); INSERT INTO kurgid VALUES (NULL, 33, 7, 180); INSERT INTO kurgid VALUES (NULL, 8, 5.5, 90); SELECT * FROM kurgid; SELECT * FROM kurgid ORDER BY pikkus; SELECT * FROM kurgid WHERE pikkus < 20; SELECT * FROM kurgid WHERE pikkus < 20 AND diameeter <= 5; -- Näidake kurgid, mis on kergemad kui 100 grammi -- Näidake kurgid, mille mass on 50-150 grammi SELECT * FROM kurgid WHERE mass < 100; SELECT * FROM kurgid WHERE mass >= 50 AND mass <= 150; SELECT * FROM kurgid WHERE mass >= 50 AND mass <= 150 ORDER BY diameeter; SELECT 3.14* POWER(diameeter/2, 2)*pikkus FROM kurgid; SELECT id, pikkus, diameeter, ROUND(3.14*POWER(diameeter/2, 2)*pikkus) AS ruumala FROM kurgid; -- Kuva kurgi pikkuse ja diameetri suhe SELECT id, pikkus/diameeter FROM kurgid; -- Kuva iga kurgi tihedus (mass jagatud ruumalaga) SELECT id, mass, pikkus, diameeter, mass/ROUND(3.14*POWER(diameeter/2, 2)*pikkus) AS tihedus, ROUND(3.14*POWER(diameeter/2, 2)*pikkus) AS ruumala FROM kurgid;