title: SQL Select all entries from last two months
body: <p>I would like to select dynamically all entries from last two months, and without entering date range in my query.</p>
  
  <p>Here is my simple code:</p>
  
  <pre><code>SELECT Customer_Name, Date FROM table_Customer; all data between last  two month
  </code></pre>
  
  <p>Thanks in advance for your help</p>
  
  <pre><code>SELECT
      ME.FullName,
      R.RuleDefaultName,
      PR.ObjectName,
      PR.CounterName,
      P.DateTime,
      P.SampleCount,
      P.MinValue,
      P.MaxValue,
      P.AverageValue,
      P.StandardDeviation
  FROM
      Perf.vPerfHourly P
  INNER JOIN vManagedEntity ME ON
      P.ManagedEntityRowId = ME.ManagedEntityRowId
  INNER JOIN vPerformanceRuleInstance PRI ON
      P.PerformanceRuleInstanceRowId = PRI.PerformanceRuleInstanceRowId
  INNER JOIN vPerformanceRule PR ON
      PRI.RuleRowId = PR.RuleRowId
  INNER JOIN vRule R ON
      PRI.RuleRowId = R.RuleRowId
  </code></pre>