<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span>Boombatower's conversion doesn't seem to handle HAVING:</span></div><div style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><font size="2"><span>&nbsp; SELECT uid FROM {userpoints} WHERE uid &gt; 0&nbsp; GROUP BY uid HAVING SUM(points) &gt; %d</span></font></div><div><br><span></span></div><div><span>I wonder if this even works on a Postgres system, but that's not my issue.</span></div><div><br><span></span></div><div><span>How would this convert to DBTNG? Yes, I know I can still do a db_query (as I am currently doing), but I'd like to convert everything.<br></span></div><div>&nbsp;</div><div><font color="#ff007f" face="bookman old style, new york, times, serif" size="4"><i><strong>Nancy</strong></i></font></div>&nbsp;<div><font face="arial, helvetica, sans-serif">Injustice anywhere is a threat to justice
 everywhere. -- Dr. Martin L. King, Jr.</font></div></div></body></html>