sql - freebase query with inner joins on the statment -


can create inner join on free base use other query..

i try create join between 2 querys:

the first, select artist genre same nirvana without nirvana:

[{   "id": null,   "name": null,   "name!=": "nirvana",   "type": "/music/artist",   "genre": [{     "name|=": [       "punk rock",       "grunge",       "alternative rock",       "rock music",       "hardcore punk"     ]   }] }] 

the second, select genre of nirvana:

[{   "name": "nirvana",   "type": "/music/musical_group",   "/music/artist/genre": [] }] 

i want create query not work..

[{   "id": null,   "name": null,   "name!=": "nirvana",   "type": "/music/artist",   "genre": [{     "name|=":      [{         "name": "nirvana",         "type": "/music/musical_group",         "/music/artist/genre": []      }]   }] }] 

i'm not sure why need 1 query. since nirvana's music spans number of popular genres query return thousands of results mean you'll have make multiple api requests results either way.

in case, here's mql query finds bands have @ least 1 music genre in common nirvana:

[{   "id": null,   "name": null,   "/music/artist/genre": [{     "id": null,     "name": null,     "!/music/artist/genre": {       "id": "/m/0b1zz",       "name": null     }   }] }] 

the exclamation mark in front of 2nd genre property means want inverse relationship ie. "music artists genre" instead of "music genres artist".

note i've used mid (/m/0b1zz) represent nirvana. shouldn't using names identify topics in query since they're not unique. want results the nirvana started kurt cobain in 1987, not band named nirvana.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -