Almost anything you would want to do through the Facebook Graph API is possible with FQL and the Facebook ActionScript 3 SDK. But wrapping your head around the structure of a query, and how you can actually use one to retrieve the data you want, requires a bit of effort and a shift in mindset—particularly if you've not done any SQL before!
Subqueries are an integral part of FQL; they allow us to perform multiple queries within an overall query, and the results of those nested queries feed in to the larger overall query, affecting its results. The big bonus to using subqueries is that everything is done on the server side, which speeds things up tremendously compared to the alternative of not using subqueries, having to go back-and-forth between the client and server to generate the final query.
One of the most common types of subquery would be that which returns a list of the user's friends. In this recipe, we're going to use a subquery to return user details of the...