# SQL Help

**URL:** <https://forum.kirupa.com/t/sql-help/241023>\
**Category:** Uncategorized\
**Created:** [October 9, 2007, 2:15pm UTC](https://forum.kirupa.com/t/sql-help/241023 "2007-10-09T14:15:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Digitalosophy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/digitalosophy/32/1114_2.png) [@Digitalosophy](https://forum.kirupa.com/u/Digitalosophy)\
**Post date:** [October 9, 2007, 2:15pm UTC](https://forum.kirupa.com/t/sql-help/241023/1 "2007-10-09T14:15:12Z")

</div>

Table set up

```auto

id
name
location

```

Sample out put

* * *

Dave’s Pizza  
New York

Sal’s Pizza  
New York

Angel’s Pizza  
New Jersey

* * *

What I want to do is group all the cities that are the same and only print them once.

Desired Output:

New York  
Dave’s Pizza  
Sal’s Pizza

New Jersey  
Angela’s Pizza

Can I do this with just SQL? Not sure why I am having trouble with this, should be easy.

Thanks
