SourceCode/PROMS/SQL/PartsWithSectionAndSteps.sql

4 lines
157 B
SQL

select contentid, count(*) howmany, min(fromtype) mnfrom, max(fromtype) mxfrom
from parts
group by contentid
having min(fromtype) <= 2 and max(fromtype) >= 3