Select two columns from same table with different WHERE conditions <p>I have two select statements and I want to generate two columns, one from each statement side by side using these two select statements inside a single select statement</p> <p><strong>Query 1</strong></p> <pre><code> SELECT DISTINCT CASE_ID from t1 WHERE MODIFIED_DATE BETWEEN TO_DATE('{RUN_DATE_YYYYMMDD}','YYYYMMDD')-56 AND TO_DATE('{RUN_DATE_YYYYMMDD}','YYYYMMDD')-49 </code></pre> <pre> CASE_ID 12 13 14 15 17 </pre> <p><strong>Query 2</strong></p> <pre><code>SELECT DISTINCT CASE_ID from t1 WHERE MODIFIED_DATE BETWEEN TO_DATE('{RUN_DATE_YYYYMMDD}','YYYYMMDD')-49 AND TO_DATE('{RUN_DATE_YYYYMMDD}','YYYYMMDD')-42 </code></pre> <pre> CASE_ID 45 98 67 90 76 82 61 </pre> <p>Final Output should be something like:</p> <pre> C1 C2 12 45 13 98 14 67 15 90 17 76 82 61 </pre> <p>Could anyone tell me how to do to so?</p> <p>Thank You. </p> <hr> <p><strong>Update</strong></p> <p>One of the query I tried from the answers :</p> <pre><code>SELECT DISTINCT case when MODIFIED_DATE BETWEEN TO_DATE('{RUN_DATE_YYYYMMDD}','YYYYMMDD') - 56 AND TO_DATE('{RUN_DATE_YYYYMMDD}','YYYYMMDD') - 49 then CASE_ID end as c1, DISTINCT case when MODIFIED_DATE BETWEEN TO_DATE('{RUN_DATE_YYYYMMDD}','YYYYMMDD')-49 AND TO_DATE('{RUN_DATE_YYYYMMDD}','YYYYMMDD')-42 then CASE_ID end as c2 from t1 WHERE MODIFIED_DATE BETWEEN TO_DATE('{RUN_DATE_YYYYMMDD}','YYYYMMDD') - 56 AND TO_DATE('{RUN_DATE_YYYYMMDD}','YYYYMMDD') - 42 </code></pre> <p>And I am getting ORA-00936: missing expression. Could anyone tell me the problem?</p> <p>Thanks.</p>