• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 315
  • Last Modified:

query of people in groups

Suppose I have a table named "Team". I would like to query this table so that it returns all people grouped by their team.  Can someone write this query, as I am stuck.


So here is my table



Team

1 | A  | Tony
2 | B  | Jim
3 | C  | Jake
4 | A  | Karen
5 | A  | Marcia
6 | B  | Rory
7 | C  | Jerry
8 | C  | Thomas


Here is the result of the query

1 | A  | Tony
4 | A  | Karen
5 | A  | Marcia
6 | B  | Rory
2 | B  | Jim
3 | C  | Jake
7 | C  | Jerry
8 | C  | Thomas
0
brgdotnet
Asked:
brgdotnet
1 Solution
 
lwadwellCommented:
Assuming the columns where called ID, Teamname and Name ...

SELECT ID, Teamname, Name
FROM team
ORDER by Teamname
0
 
brgdotnetAuthor Commented:
Duh, how obvious. I must have had a mental block. Thanks a bunch.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now