Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>select t.Month, count(*) Members from ( select case when startdate &lt;= to_date('01-Jan-2002', 'DD-MON-YYYY') AND enddate &gt;= to_date('31-Jan-2002', 'DD-MON-YYYY') then ' Jan' when startdate &lt;= to_date('01-Feb-2002', 'DD-MON-YYYY') AND enddate &gt;= to_date('28-Feb-2002', 'DD-MON-YYYY') then ' Feb' when startdate &lt;= to_date('01-Mar-2002', 'DD-MON-YYYY') AND enddate &gt;= to_date('31-Mar-2002', 'DD-MON-YYYY') then ' Mar' when startdate &lt;= to_date('01-Apr-2002', 'DD-MON-YYYY') AND enddate &gt;= to_date('30-Apr-2002', 'DD-MON-YYYY') then ' Apr' when startdate &lt;= to_date('01-May-2002', 'DD-MON-YYYY') AND enddate &gt;= to_date('31-May-2002', 'DD-MON-YYYY') then ' May' when startdate &lt;= to_date('01-Jun-2002', 'DD-MON-YYYY') AND enddate &gt;= to_date('30-Jun-2002', 'DD-MON-YYYY') then ' Jun' when startdate &lt;= to_date('01-Jul-2002', 'DD-MON-YYYY') AND enddate &gt;= to_date('31-Jul-2002', 'DD-MON-YYYY') then ' Jul' when startdate &lt;= to_date('01-Aug-2002', 'DD-MON-YYYY') AND enddate &gt;= to_date('31-Aug-2002', 'DD-MON-YYYY') then ' Aug' when startdate &lt;= to_date('01-Sep-2002', 'DD-MON-YYYY') AND enddate &gt;= to_date('30-Sep-2002', 'DD-MON-YYYY') then ' Sep' when startdate &lt;= to_date('01-Oct-2002', 'DD-MON-YYYY') AND enddate &gt;= to_date('31-Oct-2002', 'DD-MON-YYYY') then ' Oct' when startdate &lt;= to_date('01-Nov-2002', 'DD-MON-YYYY') AND enddate &gt;= to_date('30-Nov-2002', 'DD-MON-YYYY') then ' Nov' when startdate &lt;= to_date('01-Dec-2002', 'DD-MON-YYYY') AND enddate &gt;= to_date('31-Dec-2002', 'DD-MON-YYYY') then ' Dec' end as Month from member) t group by t.Month </code></pre> <p>Where <code>member</code> is the table name.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload