title: Getting Wikipedia IDs in MQL
body: <p>Freebase <a href="http://download.freebase.com/wex/" rel="nofollow">WEX dumps</a> contain a <code>wpid</code> column corresponding to the <code>page_id</code> from the source MediaWiki database in the <a href="http://wiki.freebase.com/wiki/WEX/Documentation#freebase_wpid" rel="nofollow"><code>freebase_wpid</code></a> table. This table provides a mapping between Wikipedia numeric article/redirect IDs and Freebase GUIDs (Global Unique IDs).</p>
  
  <p><code>guid</code> use as foreign keys is deprecated by <code>mid</code> for <a href="http://wiki.freebase.com/wiki/Mid" rel="nofollow">lots of good reasons</a>, but that doesn't change the fact that guids are still used at a system level so I'm going to call <code>mid</code> an accessor from here on.</p>
  
  <p>Using the <code>mid</code> accessor is flexible in MQL. One can query using <code>"mid": null</code> and using <code>"mid":[]</code> depending on whether one needs the current <code>mid</code> or every <code>mid</code>.</p>
  
  <p>Finding a list of <code>wpid</code> values per <code>mid</code> is straightforward in MQL: </p>
  
  <pre><code>[{
    "mid": null
    "key": [{"namespace":"/wikipedia/en_id", "value":null}]
  }]
  </code></pre>
  
  <p>But if all is well in the universe, each current <code>mid</code> should have only one current <code>wpid</code>, so is there a way to do something like <code>"wpid": null</code> like one can with the <code>mql</code> accessor?</p>