From: HaidarPesebe Date: November 11 2010 9:00am Subject: backfill results for the same month and year List-Archive: http://lists.mysql.com/mysql/223568 Message-Id: <005f01cb817e$e634e640$6a0ba8c0@WEBMASTER> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_005C_01CB81B9.904BA300" ------=_NextPart_000_005C_01CB81B9.904BA300 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Dear All, I have the following data ID CITY QTY MONTH YEAR ------------------------------- 1 Chigago 10 11 2010 1 NewYork 22 11 2010 1 London 54 11 2010 1 Chigago 7 10 2010 1 NewYork 26 10 2010 1 London 33 10 2010 ID =3D ID PRODUCT. How can I backfill results with the same ID by month and year, with = results like this: MONTH/YEAR QTY TOTAL --------------------------- 11/2010 86 10/2010 66 and etc. Please help Thanks haidarpesebe ------=_NextPart_000_005C_01CB81B9.904BA300--