3

我有这张PROJECT桌子:

    PJNO  TASKNO        DESCRIP                     Other... 
    5555    11        Prototype New Screens       
    4444    21        Test First Prototype      
    5555    13        Create Test Plan           
    6666    73        Prototype Custom Screens  
    7777    73        Present Test Plan        
    3333    81        Install PT-Sale Package   
    7777    74        Conduct Tests               
    5555    12        Convert Data Files        

我需要列出所有至少有 2 个任务的项目。

SELECT PJNO
FROM PROJECT
WHERE // COUNT TASKNO... here I am not sure how to introduce a conditional statement?    
4

1 回答 1

2
SELECT PJNO
FROM PROJECT
GROUP BY PJNO
HAVING COUNT(TASKNO)>1;
于 2013-06-15T04:54:53.610 回答