I understand the concept of group by and have used it successfully. However, the table at hand has a column for car names, e.g., Camry1, Camry2, chevy1, chevy2, maxima1, maxima2.
I want to get a count of toyotas, nissans, and chevys, etc. I believe I need to use group by, but since chevy1 is not equal to chevy2, and camry1 is not equal to camry2, they are not couted in same group. I would like to group by the first three letters of car name, and get a count of these cars. Those which do not fit in camry# or maxima # or chevy#, should all be grouped in another group, regardless of the first three letters of the car's name.
To add an extra column to the existing table is not an option.
All suggestions welcome.
Thanks,
Indiana
I want to get a count of toyotas, nissans, and chevys, etc. I believe I need to use group by, but since chevy1 is not equal to chevy2, and camry1 is not equal to camry2, they are not couted in same group. I would like to group by the first three letters of car name, and get a count of these cars. Those which do not fit in camry# or maxima # or chevy#, should all be grouped in another group, regardless of the first three letters of the car's name.
To add an extra column to the existing table is not an option.
All suggestions welcome.
Thanks,
Indiana