Reply to Help with SQL query?

Your name:

Reply:


Posted by Martin on 09/05/05 01:04

I have a table in which the records a bunch of fields; for this query,
I'm interested in three of them - let's call them Fld1, Fld2 and Fld3.
For each record in the table, these fields may or may not contain data
(a stock ticker symbol - like MSFT, for example). Different records
may or may not contain the same symbol in the various fields.

For example:
Fld1 Fld2 Fld3
Record1: MSFT | GOOG | null
Record2: INTL | ABC | MSFT

I want to execute a query that will read all of the records in the
table and return a single-column list of all the unique symbols and a
count of the quantity of each one - like so:

MSFT | 2
GOOG | 1
INTL | 1
ABC | 1

I have no idea how to do this.

Help?

[Back to original 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

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