<font face="verdana,sans-serif">@Raj<br><br>I tried your query and variation by using replacing duration with billsec.<br>In both cases, I get results including disposition &quot;NO ANSWER&quot;<br><br><br><br></font><br><div class="gmail_quote">
On Fri, Sep 14, 2012 at 9:58 PM, Raj Mathur (राज माथुर) <span dir="ltr">&lt;<a href="mailto:raju@linux-delhi.org" target="_blank">raju@linux-delhi.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Friday 14 Sep 2012, RSCL Mumbai wrote:<br>
&gt; I am trying to construct MySQL query(s) to get a list of calls which<br>
&gt; lasted for less than 5 seconds between a given date range.<br>
&gt; Any help is appreciated.<br>
<br>
</div>On the CDR database, to get all calls that lasted &lt; 5 seconds between<br>
2012-09-01 and 2012-09-07 (inclusive), the MySQL query would be:<br>
<br>
select * from cdr<br>
where calldate &gt;= &#39;2012-09-01&#39; and calldate &lt; &#39;2012-09-08&#39;<br>
and duration &lt; 5;<br>
<br>
Regards,<br>
<br>
-- Raj<br>
<span class="HOEnZb"><font color="#888888">--<br>
Raj Mathur                          || <a href="mailto:raju@kandalaya.org">raju@kandalaya.org</a>   || GPG:<br>
<a href="http://otheronepercent.blogspot.com" target="_blank">http://otheronepercent.blogspot.com</a> || <a href="http://kandalaya.org" target="_blank">http://kandalaya.org</a> || CC68<br>
It is the mind that moves           || <a href="http://schizoid.in" target="_blank">http://schizoid.in</a>   || D17F<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br>