All, Thanks for going through my post, Finally i have found the answer... +++++++++++++++++++++++ SELECT DISTINCT t1.Year AS Year, t1.Count AS ABC_Count, t2.Count AS PQR_Count FROM db AS t1, db AS t2 WHERE t1.Count != t2.Count AND t1.Brand = 'ABC' AND t2.Brand = 'PQR' AND t1.Year = t2.Year ORDER BY t1.Year LIMIT 0 , 30 +++++++++++++++++++++++ -- YogS
On 7/11/08, yogi_raj_143 <[EMAIL PROTECTED]> wrote: > > Hello, > I need some help in creating mySQL query, > > I have a database in format > > Year Brand Rel > 1990 ABC 5 > 1990 PQR 4 > 2000 ABC 3 > 2000 PQR 2 > > I want to display this data in format > Year Brand_ABC_Rel Brand_PQR_Rel, ie > 1990 5 4 > 2000 3 2 > > Pls let me know the mYSQL for the same... > > > [Non-text portions of this message have been removed]
