I want to pull results and count how many of each name is pulled but without grouping...
for example I want this:
John Doe 3
John Doe 3
John Doe 3
Mary J
If you don't want to use a subquery, you can also join the table to itself like so: That would require a subquery. Perhaps something like this:
SELECT t1.name, COUNT(t2.name)
FROM my_table AS t1
INNER JOIN my_table AS t2 ON (t1.primary_key_field = t2.primary_key_field)
WHERE some_conditions
GROUP BY t1.name