SELECT * FROM EMP
WHERE
SAL=:P_SAL
AND COMM=:P_COMM1
AND EMPNO IN (SELECT EMPNO FROM EMP WHERE COMM=:P_COMM2)
AND DEPTNO IN (:PLIST1, :PLIST2, :PLIST3)
ORDER BY %COLUMN% %SEQUENCE%

/*PARAM* P_SAL, Int32, 1600 *PARAM*/
/*PARAM* P_COMM1, Int32, 300 *PARAM*/
/*PARAM* P_COMM2, Int32, 300 *PARAM*/
/*PARAM* PLIST1, Int32, 10 *PARAM*/
/*PARAM* PLIST2, Int32, 20 *PARAM*/
/*PARAM* PLIST3, Int32, 30 *PARAM*/
/*PARAM* COLUMN, EMPNO *PARAM*/
/*PARAM* SEQUENCE, DESC *PARAM*/

-- パラメタ設定済み