To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
SQL CourseSQL Course
> Ask questions about the lessons on SQL Course 1 and 2. If you have problems
> with the interface, please post in the Feedback forum
Iz it possible that i can find out which model name has appeared the most number of times in my database? Lets say under the field MODEL, there can be many different names for the model. How can i check which name appeared the max no. of times?
select Top 1 Title, count(*)
from Employees
group by Title
order by count(*) desc
For others
select Title, count(*)
from Employees
group by Title
having count(*) = (select max(a.counter)
from
(select count(*) as counter
from Employees
group by Title) a)