Mysql 12: ALIAS
Written by: maffelu , 2009-04-16 21:19:52
| store_name | store_sales | store_updates |
|---|---|---|
| Hanks Hardware | 2500 | 2009-01-01 |
| Santos SuperStore | 750 | 2008-12-01 |
| Bobs Boutique | 1250 | 2009-01-01 |
| Patty´s Pantstore | 1050 | 2008-12-15 |
| Hanks Hardware | 1750 | 2008-01-01 |
SELECT store_name Store, SUM(store_sales) Sales
FROM stores
GROUP BY store_name
| Store | Sales |
|---|---|
| Bobs Boutique | 1250 |
| Hanks Hardware | 4750 |
| Patty´s Pantstore | 1050 |
| Santos SuperStore | 750 |
There are no comments on this article.
If you have any question or just want to leave a message, just fill out the form below!
Your e-mail will not be visible in your post, it is for validation reasons only
Maffelu
Creator and admin of MorkaLork.com.
Started programming in HTML back when frames and tables was the way to design a page, moved on to Pascal/Delphi, PHP, javascript/jQuery, VB.NET/C#, Java and C++.
Currently studies .NET (in general) focusing on ASP.NET.