making a "pattern table"

2004-11-22 Thread starr
Hi! I am wondering if there is a way using SQL to make a pattern file (I'm not sure exactly what to call it) of the sort following, which keeps track of people in programs of different kinds, by months of the year. A given file can be set up as below examining only 1 type of program (that is wha

counting sequences

2004-11-21 Thread starr
Hi! I need to use SQL to count some sequences. We have taken a short snapshot of 1 year for people registered in programs. So we have data in a table like so: ID m1 m2 m3 m4 m5 m6 m7m8 m9 m10 m11 m12 The "m1", "m2", "m3" refers to month 1, month2, month3, etc. The data for 1 person might loo

SQL code sought to remove duplicates, using most recent date

2004-11-20 Thread starr
Hi! I have a problem that may only be solvable using a programming approach, but I'm wondering if there is an SQL method in MySQL. The problem is that I have a table that looks like this: CREATE TABLE `test` ( `uid` mediumint(6) NOT NULL auto_increment, `perid` varchar(10) default NULL, `pro