Drupal db select IN, group by count
$query = db_select('form_submissions', 'sfs')-&gt;fields('sfs', array());
    $subquery = db_select('form_submissions', 'sfs')-&gt;fields('sfs', array('address'))-&gt;groupBy('address')-&gt;having('count(address) &gt; 1');
    $query-&gt;condition('address', $subquery, 'in');

    $submissions = $query-&gt;execute();