MLUG: [MLUG] query to calculate column in mysql
[MLUG] query to calculate column in mysql
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
i have a table which have 7 columns. this table is
fill 8 rows. first user fill two colum, 2nd is fill 3
column, 3 rd user fill 5 column and so on. i want to
calculate each user that how many column fill with
data.  suppose
-------------------------------------------------
col1 | col2	| col3 | col4 | col5 | col6 | col7 |
--------------------------------------------------
user1	phy	  chm	  
user2	chm	  antr	  phy	
user3	phy	  chm	  antr	  bio     chm
user4	chm	  bio	  antr	  phy
user5  bio	  ir	  chm		
user6  chm	  bio	  chm	  phy

---------------------------------------------------
this is pettrain of my table. i want to calculate that
how many column are fill user 1,user2 and so on.
in this case the answer of query (if apply on row1) is
2, on row2 answer is 3, on row 3 answer 5 and so on. 
please help me to write a query to calculate.
asim

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members