my $sql = 'SELECT DISTINCT id FROM mytable WHERE ' . $dbh->quote_identifier('open') . ' = ?';