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 Group by / Order by - My-Web-Professionals-Blog

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 ASC oder nur

ORDER BY Feld Absteigende Sortierung ORDER BY Feld DESC

GroupBy_OrderBy

Group by / Order by
Markiert in:             

Schreibe einen Kommentar