Here's an other nice article on SQL and Filemaker found on FilemakerHacks. A good way to understand how to manage SQL query in Filemaker.

the missing fm 12 execute sql reference