sayfrndship
10-25-2008, 01:06 AM
Hi
Please tell me how to do following
I have table comp_detailproduct
In which there is productID field, Product ID is taken from other table containg products.
there can be more than one productID in details table, i have to use query, that will reutrn result, with most occurence of product id first, for exp is Product ID 1 is repeated 4 time, product id 2 is repeated 3 time, i need to use query that will return 1 first, no matter where is located 1 either it's on last rows.
Please tell me how to do following
I have table comp_detailproduct
In which there is productID field, Product ID is taken from other table containg products.
there can be more than one productID in details table, i have to use query, that will reutrn result, with most occurence of product id first, for exp is Product ID 1 is repeated 4 time, product id 2 is repeated 3 time, i need to use query that will return 1 first, no matter where is located 1 either it's on last rows.