Vishal<br><br>Well explained!  Thanks for that.<br><br>Michael<br><br><br><div class="gmail_quote">2009/5/8 Vishal Talwar <span dir="ltr">&lt;<a href="mailto:vishal@metaweb.com">vishal@metaweb.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Ah, sorry, I didn&#39;t read the earlier emails carefully enough. The new query editor is smart enough to automatically prefix the duplicated keys (eg. in Kirrily&#39;s query, it&#39;s &quot;ns0:name&quot;). In the old query editor, you would actually see the duplicates disappear before your eyes after hitting the &quot;Format&quot; button. As the MQL reference guide explains:<br>

<br>
&quot;&quot;&quot;<br>
Unfortunately, this query is not valid JSON: it includes the same property name twice, which means that cannot be parsed into object form. (To put this another way, you could not represent this query in a dictionary or hash data structure in a programming language like Python, Ruby or JavaScript.)<br>

&quot;&quot;&quot; <a href="http://mql.freebaseapps.com/ch03.html#id2952288" target="_blank">http://mql.freebaseapps.com/ch03.html#id2952288</a><br>
<br>
So since keys must be unique, there has to be one winner. With MQL it seems that the last key wins and the query can thus be rewritten as:<br>
<br>
{<br>
  &quot;id&quot;: null,<br>
  &quot;name&quot;: null,<br>
<div class="im">  &quot;limit&quot;: 1,<br>
  &quot;type&quot;: &quot;/people/person&quot;<br>
}<br>
<br>
</div>Freebase simply returns the first person it finds, and it happens to be Jack Abramoff.<br>
<div class="im"><br>
Vishal<br>
<br>
----- Original Message -----<br>
From: &quot;Michael Callaghan&quot; &lt;<a href="mailto:john.michael.callaghan@gmail.com">john.michael.callaghan@gmail.com</a>&gt;<br>
To: &quot;For discussions about MQL, Freebase API and apps built on Freebase&quot; &lt;<a href="mailto:developers@freebase.com">developers@freebase.com</a>&gt;<br>
</div><div><div></div><div class="h5">Sent: Friday, May 8, 2009 12:12:50 PM GMT -08:00 US/Canada Pacific<br>
Subject: Re: [Developers] query API - overuse and sanctions?<br>
<br>
<br>
Vishal<br>
<br>
Thanks but I&#39;m quite aware of the error in the query. I only included it out of interest given the odd result it returns...<br>
<br>
Michael<br>
<br>
<br></div></div></blockquote></div><br>