Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Vivaldi
Constraint Violating Yak Guru
298 Posts |
Posted - 2001-04-10 : 12:07:12
|
| Well,I have been working on a query for the pastfew days that I cannot conquer, I was hoping I could get some direction from the master's of sql.I have 3 tables as such.ResidentResidentID | Name | bookingDateOffenseoffenseID | residentid | literalid | oLevelLiteralliteralid | descriptionSo, basically, I need a reportof the count of new admits for a month,grouped by literal.descriptionbut the issues is this.there can be many instances of a resident in the Offense table. I need the Most lethal record only for each resident which is categorized by oLevel. the oLevel column can have F,G or M F = WorstG = MiddleM = Leastso an alphabetical sort will work,but I have twisted the sql every which way but loose and cannot come up with a reasonable solution.I have a backup plan to use a vbs array, but if i can make this query work, it builds on many others to come, so a *real* solution would be great.Thanks for the time.Software Composer |
|
|
|
|
|