From: sagar bs Date: November 22 2012 10:06am Subject: Getting distinct values in diff columns List-Archive: http://lists.mysql.com/mysql/228677 Message-Id: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b5d6348cd1e3204cf129faf --047d7b5d6348cd1e3204cf129faf Content-Type: text/plain; charset=ISO-8859-1 Hi all, I have the table with two columns(account_name and order_date). In the account_name col, some account names are only once and few account names are twice and few others are 3/4/5 times and in col2 there is order_date. For same account name there may be 2/3/4/5 different order dates. Now I need to get distinct account names, and last order date, second last order date ans so on in different columns. Please help me out to solve the issue in mysql --047d7b5d6348cd1e3204cf129faf--