How to make a single query with multiple records How do I make this as a single query?

$result = db_query("SELECT replace(source, 'node/', '') as source FROM {url_alias}  where source like 'node/%' limit 11");
foreach ($result as $record) {
$result2 = db_query("SELECT fci.* FROM {node} AS fci LEFT JOIN {node_access} AS fdfp ON fci.nid = fdfp.nid where fci.nid = :item_id AND fdfp.nid IS NULL", array(':item_id' =&gt; $record-&gt;source));
  foreach ($result2 as $record2) {
    echo '&lt;pre&gt;';
    print_r($record2);
  }
}
This works for me.

$result2 = db_query("SELECT fci.* FROM {node} AS fci LEFT JOIN {node_access} AS fdfp ON fci.nid = fdfp.nid where fci.nid IN(SELECT replace(source, 'node/', '') as source FROM {url_alias}  where source like 'node/%') AND fdfp.nid IS NULL");
foreach ($result2 as $record2) {
  echo '&lt;pre&gt;';
  print_r($record2);
}