comparing rows on a mysql table
        Posted  
        
            by user311324
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by user311324
        
        
        
        Published on 2010-04-07T19:35:59Z
        Indexed on 
            2010/04/07
            19:53 UTC
        
        
        Read the original article
        Hit count: 203
        
Ok here's the deal I got one table with a bunch of client information. Each client makes up to one purchase a year which is represented by an individual row. there's a column for the year and there's a column the contains a unique identifier for each client. What I need to do is to construct a query that takes last year and this year and shows me which clients were here made a purchase last year but not make a purchase this year.
I also need to build a query that shows me which clients did not make a purchase last year and the year before last but did make a purchase this year.
© Stack Overflow or respective owner