Warning: file_put_contents(/home/httpd/vhosts/phprog.ch/httpdocs/wp-content/advanced-cache.php): Failed to open stream: Permission denied in /home/httpd/vhosts/phprog.ch/httpdocs/wp-content/plugins/comet-cache/src/includes/traits/Plugin/InstallUtils.php on line 349 SQL Archive - Seite 2 von 3 - My-Web-Professionals-Blog

SQL

In dieser Kategorie, gebe ich eine Kurzeinführung in das Thema SQL.

Group by / Order by

Die Anzahl der Kunde welche aus Deutschland oder Mexico kommen, sortiert nach Anzahl:       SELECT country, COUNT(country) AS Anzahl                   FROM customers WHERE country=’Germany‘ OR country=’Mexico‘                   GROUP BY country                   ORDER BY Anzahl Aufsteigende Sortierung entweder ORDER BY Feld