title: SQL DML SCRIPTS
body: <p>For a given period (bounded by two given dates inclusive), say 01 December 2002 to 31 July 2003, 
  find the set of the people who have at least one EZ link card issued within the specified period. For 
  EACH person in the set, list the (i) Owner NRIC, (ii) the total number of his/her cards issued during 
  the period, and (iii) total number of card replacements (till current date) that have been made by the 
  owner for only those cards that were issued during the given period. List your results in ascending 
  order of Owner NRIC. </p>
  
  <pre><code>create table card
  (
  CardID  int not null primary key,
  OwnerNRIC   char(9),
  IssuedDcardate  date,
  StoredValue decimal (5,2),
  OldCardID   int,
  constraint card_fk foreign key (OldCardID) references card(CardID)
  );
  </code></pre>
  
  <p>As above is my card table.</p>
  
  <p>This is my attempt at it but i was pretty lost.</p>
  
  <pre><code> Select distinct(ownerNRIC) as NRIC,count(*) as Total Crads Issued during Period
  From card
  Where issuedDate between ‘2002-12-01’ and ‘2003-7-31’ group by ownerNRIC;
  </code></pre>