Hello,
how I can find out items which are in GROUP BY?
Examle:
table:
ID NAME
1 john
2 martin
3 taylor
4 john
5 martin
select *, count(*) from table group by name;
the result will be somethink like this:
ID NAME COUNT
1 john 2
2 martin 2
3 talylor 1
and now I want to find out all IDs which contains ID=1
result
ID NAME
1 john
4 john
I hope you understand me, Thanks for answer
how I can find out items which are in GROUP BY?
Examle:
table:
ID NAME
1 john
2 martin
3 taylor
4 john
5 martin
select *, count(*) from table group by name;
the result will be somethink like this:
ID NAME COUNT
1 john 2
2 martin 2
3 talylor 1
and now I want to find out all IDs which contains ID=1
result
ID NAME
1 john
4 john
I hope you understand me, Thanks for answer