title: SQL sysdate / Trunc functions in Oracle
body: <p>Ok so i'm trying to return all information in a a month that preceeds the current month. I'm struggling slightly with the format and code. Here is my attempt.
  I can provide table structure if needed</p>
  
  <pre><code>SELECT hd.Holiday_desc,
  soh.Site_Name,
  FROM   holiday_details hd
  WHERE TRUNC(LAST_DAY(SYSDATE), 'MM' - 1) = TRUNC(hdep.Holiday_Departure, 'MM')
         INNER JOIN holiday_departure hdep 
                 ON hd.holiday_code = hdep.holiday_code
  Inner join site_visited sv on hd.Holiday_Code = sv.Holiday_code
  inner join site_of_holiday soh on sv.Site_code = soh.Site_code
  </code></pre>