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 |
|
thussain
Starting Member
7 Posts |
Posted - 2001-07-17 : 15:49:07
|
| I have two tablesPeople AssignemntPeople_id Assign_idStatus People_id Creation_date Start_dateI am trying to run this queryShow people group by status was created on this date and have assignment under this date, or have any assignment at allthe result looks likeStatus Count Percent Assign# EverAssignACTIVE 12 54.45% 4 6CLOSE 4 18.18% 12 12MAP 6 27.27% 11 13The query I try to ran isSelect count(people_id),status,(select count(assign_id) from assignmentgroup by people_idwhere assignment.people_id=people.people_idand start_date='01/01/01')from peoplewhere creation_date ='01/01/01'I am trying not to use cursor or temp tables. |
|
|
|
|
|