|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have a table called evolution project with four fields: month, proj_id (Project ID), user_id (User ID) and role.
The month field is in the format: 200202. All the other fields are numbers. Each project has multiple users. A user may be associated with more than one project. The role field is simply a number based on a key for different roles the user can performin the project: developer, passive etc. The number of users associated with a project is called the degree of the project. I want to query out all projects with a degree greater than a certain constant 'c', using SQL. HELP PLEASE. |
|
#2
|
|||
|
|||
|
Don't have a SQL server installed on this computer, so I'm going to wing it.
Code:
SELECT count(*), proj_id FROM evolution WITH (NOLOCK) GROUP BY proj_id HAVING count(*) > 5
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > SQL Query - HELP PLEASE |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|