0

Multi-tables query of YQL for new learner

i read the YQL document to learn the YQL grammar.  As a SQL-like language, how can i finish a multi-tables query in YQL.

For example:
there is two tables of T1 and T2.
i can write below in SQL:    select T1.a, T1.b, T2.c, T2.d from T1, T2 where T1.a=T2.a
but how can i implement above in YQL.

Thanks for any comments/hints/help!!

by
8 Replies
  • Currently YQL doesn&#39;t support joins. But there is a support for inner query. Pl check the developer guide for complete details. Here is a sample query<br><code class="literal">select * from local.search where (latitude,longitude) in (select centroid.latitude, centroid.longitude from geo.places where text=&quot;north beach, san francisco&quot;) and radius=1 and query=&quot;pizza&quot; and location=&quot;&quot;</code>
    0
  • YQL currently doesnt support joins. But It has a similar concept of inner queries. Pl check the documentation for the complete details. Sample query can be : <br><code class="literal">select * from local.search where (latitude,longitude) in (select centroid.latitude, centroid.longitude from geo.places where text=&quot;north beach, san francisco&quot;) and radius=1 and query=&quot;pizza&quot; and location=&quot;&quot;</code>
    0
  • Joins are currently not supported. You can try inner query, if it works for you. Something like<br><code class="literal">select * from local.search where (latitude,longitude) in (select centroid.latitude, centroid.longitude from geo.places where text=&quot;north beach, san francisco&quot;) and radius=1 and query=&quot;pizza&quot; and location=&quot;&quot;<br><br>Pl check documentation for more examples.<br></code>
    0
  • Pl check documentation for inner queries. Something like <br><code class="literal">select * from local.search where (latitude,longitude) in (select centroid.latitude, centroid.longitude from geo.places where text=&quot;north beach, san francisco&quot;) and radius=1 and query=&quot;pizza&quot; and location=&quot;&quot;<br><br>Currently YQL doesn&#39;t support joins.<br></code><br><div class="quote"><div class="quotetop">QUOTE<cite>(Sanders @ 13 Feb 2012 10:24 PM)</cite></div><blockquote class="quotemain">i read the YQL document to learn the YQL grammar.&nbsp; As a SQL-like language, how can i finish a multi-tables query in YQL.<br><br>For example: <br>there is two tables of T1 and T2.<br>i can write below in SQL:&nbsp;&nbsp;&nbsp; select T1.a, T1.b, T2.c, T2.d from T1, T2 where T1.a=T2.a<br>but how can i implement above in YQL.<br><br>Thanks for any comments/hints/help!!<br><br></blockquote></div>
    0
  • Pl check inner query. <br><br><div class="quote"><div class="quotetop">QUOTE<cite>(Sanders @ 13 Feb 2012 10:24 PM)</cite></div><blockquote class="quotemain">i read the YQL document to learn the YQL grammar.&nbsp; As a SQL-like language, how can i finish a multi-tables query in YQL.<br><br>For example: <br>there is two tables of T1 and T2.<br>i can write below in SQL:&nbsp;&nbsp;&nbsp; select T1.a, T1.b, T2.c, T2.d from T1, T2 where T1.a=T2.a<br>but how can i implement above in YQL.<br><br>Thanks for any comments/hints/help!!<br><br></blockquote></div>
    0
  • YQL doesn&#39;t support joins, as of now. <br><br>A sample inner query looks like<br>select * from local.search where (latitude,longitude) in (select centroid.latitude, centroid.longitude from geo.places where text=&quot;north beach, san francisco&quot;) and radius=1 and query=&quot;pizza&quot; and location=&quot;&quot;<br><br>Pl check documentation for more information.
    0
  • thank you Vinit, i have read that part about join-tables&#39; query. and i have learned the grammar of request as you said above.<span style="text-decoration:underline;"></span><br><br>Than you repeatedly.<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ----from a fresh learner<br><br><div class="quote"><div class="quotetop">QUOTE<cite>(Vinit @ 15 Feb 2012 5:05 PM)</cite></div><blockquote class="quotemain">YQL doesn&#39;t support joins, as of now. <br><br>A sample inner query looks like<br>select * from local.search where (latitude,longitude) in (select centroid.latitude, centroid.longitude from geo.places where text=&quot;north beach, san francisco&quot;) and radius=1 and query=&quot;pizza&quot; and location=&quot;&quot;<br><br>Pl check documentation for more information.</blockquote></div>
    0
  • Thanks Vinit<br>&nbsp;&nbsp;&nbsp;&nbsp; I have learned the part of join-tables&#39; query. i decide to use twice requests for that problem.<br>&nbsp;&nbsp;&nbsp;&nbsp; More and more questions and problems is waiting for me on my road of software design, but i am confident to solve all of them.<br><br>thanks repeatedly.<br><br><div class="quote"><div class="quotetop">QUOTE<cite>(Vinit @ 15 Feb 2012 5:05 PM)</cite></div><blockquote class="quotemain">YQL doesn&#39;t support joins, as of now. <br><br>A sample inner query looks like<br>select * from local.search where (latitude,longitude) in (select centroid.latitude, centroid.longitude from geo.places where text=&quot;north beach, san francisco&quot;) and radius=1 and query=&quot;pizza&quot; and location=&quot;&quot;<br><br>Pl check documentation for more information.</blockquote></div>
    0

Recent Posts

in YQL