SQLTeam.com | Weblogs | Forums

Newbie SQL statement help


I have a table (incidents) structured as follows:

I want to return the data so that all incidents are grouped by the referrer_id, it is not simply an order by reference as I want the data to be structured like this

3001 (referrer_id)

list all victim_id's and incident_id's and detail that referrer_id has created i.e.

Victim_id, incident_id, details
32, 234, Detail 1
19, 456, Detail 3
for n records

Thanks for any feedback