avatar
Untitled

Guest 97 25th Nov, 2024

MARKUP 1.42 KB
                                           
                         1.	SELECT Name FROM city WHERE CountryCode = 'POL';
2.	SELECT Name FROM country ORDER BY Population DESC LIMIT 10;
3.	SELECT AVG(city.Population), country.Name FROM city JOIN country ON CountryCode = city.CountryCode GROUP BY 2 ORDER BY 1 DESC;
4.	SELECT Name FROM country WHERE LifeExpectancy > 75 LIMIT 1;
5.	SELECT Name FROM country ORDER BY LifeExpectancy DESC LIMIT 1;
6.	SELECT Name FROM country ORDER BY LifeExpectancy ASC LIMIT 1;
7.	SELECT CountryCode, COUNT(*) AS urzedy FROM countrylanguage GROUP BY CountryCode ORDER BY urzedy DESC;
8.	SELECT CountryCode, COUNT(*) AS rozne FROM countrylanguage GROUP BY CountryCode HAVING rozne > 5;
9.	SELECT Name FROM city WHERE CountryCode = 'POL' ORDER BY Population DESC LIMIT 1;
10.	SELECT city.Name, Country.Name FROM city JOIN Country ON Country.Code = city.CountryCode ORDER BY country.Name, city.Name ASC;
11.	SELECT SurfaceArea, Name FROM country where Continent = 'Europe' GROUP BY SurfaceArea DESC;
12.	SELECT LANGUAGE FROM countrylanguage JOIN country ON countrylanguage.CountryCode = country.Code WHERE IsOfficial = 'T' and country.LifeExpectancy BETWEEN 30 and 60;
13.	INSERT INTO city(Name,CountryCode,District,Population) VALUES('Krosno', 'POL', 'Podkarpacie', '38 400');
14.	UPDATE city SET Population = '44323' WHERE Name = 'Krosno';
15.	INSERT INTO countrylanguage(Language, CountryCode, IsOfficial) VALUES('Kaszubski', 'POL', 'F');
                      
                                       
To share this paste please copy this url and send to your friends
RAW Paste Data
Recent Pastes
Ta strona używa plików cookie w celu usprawnienia i ułatwienia dostępu do serwisu oraz prowadzenia danych statystycznych. Dalsze korzystanie z tej witryny oznacza akceptację tego stanu rzeczy.
Wykorzystywanie plików Cookie
Jak wyłączyć cookies?
ROZUMIEM