You are here: separating international from us states « PHP SQL « IT news, forums, messages
separating international from us states

Posted by laredotornado on 10/13/82 11:31

Hello, I'm using MySQL 3.23. If I have a table with two columns

REGION VARCHAR(16),
SALES FLOAT UNSIGNED

How can I write an SQL SELECT statement to give me the sales per state
-- where the "REGION" column would hold the two-letter state
abbreviation -- and sales per everything else. So a possible result
set would look like

Region Total_Sales
--------- ----------------
CA 10000.00
TX 5000.00
International 3000.00
NJ 1000.00

Your help is much appreciated - Dave

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация